3D Tic-Tac-Toe (deceptively tricky)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • #1
    behanjc & me are <3'ers
    FFR Simfile Author
    FFR Music Producer
    stargroup100
    • Jul 2006
    • 2051

    3D Tic-Tac-Toe (deceptively tricky)

    For practice, I coded this cute little puzzle game.



    Source code: http://www.cosmovibe.com/programs/sangaAI.cpp
    If it's not working, you might need this: http://www.microsoft.com/en-us/downl....aspx?id=30679
    Currently trying to rewrite the game in html5 so that everyone can play on a browser, without the need to download the packages.


    I haven't decided yet if I wanted to continue working on this to find the perfect play solution, but at the moment the AI should already be very strong at max difficulty.
    Last edited by stargroup100; 01-21-2014, 09:13 AM.
    Rhythm Simulation Guide
    Comments, criticism, suggestions, contributions, etc. are all welcome.

    Piano Etude Demon Fire sheet music
  • #2
    Snivy! Dohoho!
    FFR Simfile Author
    Charu
    • Mar 2006
    • 6263

    Re: 3D Tic-Tac-Toe (deceptively tricky)



    Welp...


    Originally posted by JohnRedWolf87
    Charu the red-nosed Snivy
    Had a very shiny nose
    And if you ever saw it
    You could even say it glows

    All of the other Snivies
    Used to laugh and call him names
    They never let poor Charu
    Join in any Snivy games

    (Click the arrow to see the rest)


    Originally posted by Vendetta21
    All in all I would say that Charu not only won this game, his play made me reconsider how I play it.

    Comment

    • #3
      TWG Chaos
      FFR Simfile Author
      Xiz
      • Feb 2012
      • 3565

      Re: 3D Tic-Tac-Toe (deceptively tricky)

      Wtf I downloaded this and this is porn

      EDIT: I just was playing porn in the background. Nvm.

      Comment

      • #4
        Sic itur ad astra
        FFR Simfile Author
        Netjet!
        • Jan 2008
        • 4721

        Re: 3D Tic-Tac-Toe (deceptively tricky)

        Originally posted by Xiz
        EDIT: I just was playing porn in the background. Nvm.
        lmfao

        edit: Was missing two dll files, found them, then got this error:

        Last edited by Netjet!; 01-20-2014, 02:56 PM.
        RIP Steve Van Ness <3

        Comment

        • #5
          behanjc & me are <3'ers
          FFR Simfile Author
          FFR Music Producer
          stargroup100
          • Jul 2006
          • 2051

          Re: 3D Tic-Tac-Toe (deceptively tricky)

          Oops. I uploaded the wrong one. It should be working now.
          Rhythm Simulation Guide
          Comments, criticism, suggestions, contributions, etc. are all welcome.

          Piano Etude Demon Fire sheet music

          Comment

          • #6
            Snivy! Dohoho!
            FFR Simfile Author
            Charu
            • Mar 2006
            • 6263

            Re: 3D Tic-Tac-Toe (deceptively tricky)



            Apparently a short google search says it's because I need Visual C++ 2010.

            I recall me getting this, but meh.


            Originally posted by JohnRedWolf87
            Charu the red-nosed Snivy
            Had a very shiny nose
            And if you ever saw it
            You could even say it glows

            All of the other Snivies
            Used to laugh and call him names
            They never let poor Charu
            Join in any Snivy games

            (Click the arrow to see the rest)


            Originally posted by Vendetta21
            All in all I would say that Charu not only won this game, his play made me reconsider how I play it.

            Comment

            • #7
              behanjc & me are <3'ers
              FFR Simfile Author
              FFR Music Producer
              stargroup100
              • Jul 2006
              • 2051

              Re: 3D Tic-Tac-Toe (deceptively tricky)

              SIGH

              lemme figure this out ugh
              Rhythm Simulation Guide
              Comments, criticism, suggestions, contributions, etc. are all welcome.

              Piano Etude Demon Fire sheet music

              Comment

              • #8
                Celestial Harbor
                FFR Simfile Author
                FFR Music Producer
                YoshL
                • Aug 2008
                • 6310

                Re: 3D Tic-Tac-Toe (deceptively tricky)

                P1: center
                P2: arbitrary move, at most will block 1 option
                P1: create 2 in a row so that the other player has to block without getting 2 in a row
                P1: last move to have 2 possible winning moves, game over

                something like that, i remember playing this alot


                Originally posted by Charu
                Only yours, for an easy price of $19.99! You too can experience the wonders of full motion rump sticking.

                Comment

                • #9
                  Sic itur ad astra
                  FFR Simfile Author
                  Netjet!
                  • Jan 2008
                  • 4721

                  Re: 3D Tic-Tac-Toe (deceptively tricky)

                  Did you figure out what was up with this? I really want to try it haha
                  RIP Steve Van Ness <3

                  Comment

                  • #10
                    behanjc & me are <3'ers
                    FFR Simfile Author
                    FFR Music Producer
                    stargroup100
                    • Jul 2006
                    • 2051

                    Re: 3D Tic-Tac-Toe (deceptively tricky)

                    k a friend told me if I really wanna make sure everyone can play this I should rewrite it in html5 or something

                    gimme like a day or two
                    Rhythm Simulation Guide
                    Comments, criticism, suggestions, contributions, etc. are all welcome.

                    Piano Etude Demon Fire sheet music

                    Comment

                    • #11
                      behanjc & me are <3'ers
                      FFR Simfile Author
                      FFR Music Producer
                      stargroup100
                      • Jul 2006
                      • 2051

                      Re: 3D Tic-Tac-Toe (deceptively tricky)

                      I posted a package that should fix the problem


                      still gonna rewrite the code for html5 but in the meantime you guys can use that if you want
                      Rhythm Simulation Guide
                      Comments, criticism, suggestions, contributions, etc. are all welcome.

                      Piano Etude Demon Fire sheet music

                      Comment

                      • #12
                        Snek
                        FFR Simfile Author
                        Izzy
                        • Jan 2003
                        • 9195

                        Re: 3D Tic-Tac-Toe (deceptively tricky)

                        Code:
                        string hex(int k) {
                        	switch (k) {
                        		case -1:
                        		return "-";
                        		case 0:
                        		return "0";
                        		case 1:
                        		return "1";
                        		case 2:
                        		return "2";
                        		case 3:
                        		return "3";
                        		case 4:
                        		return "4";
                        		case 5:
                        		return "5";
                        		case 6:
                        		return "6";
                        		case 7:
                        		return "7";
                        		case 8:
                        		return "8";
                        		case 9:
                        		return "9";
                        		case 10:
                        		return "A";
                        		case 11:
                        		return "B";
                        		case 12:
                        		return "C";
                        		case 13:
                        		return "D";
                        		case 100:
                        		return "W";
                        		default:
                        		return "0";
                        	}
                        }
                        seems like you could declare a character array such as the following then use the value k to index the array.
                        [ - ][ 0 ][ 1 ][ 2 ][ 3 ][ 4 ][ 5 ][ 6 ][ 7 ][ 8 ][ 9 ][ A ][ B ][ C ][ D ][ W ]

                        Code:
                        string hex(int k) {
                                        if (k >= -1 && k <= 13)
                                        { 
                        		          return array[k];
                                        }
                                        else if (k == 100)
                                        {
                        		          return array[14];
                                        }
                                        else
                                        {
                        		          return array[1];
                                        }
                        }
                        If I wasn't lazy I'd probably look through all of it. I'll definitely play it when I get home though.
                        Last edited by Izzy; 01-21-2014, 09:39 AM.

                        Comment

                        • #13
                          behanjc & me are <3'ers
                          FFR Simfile Author
                          FFR Music Producer
                          stargroup100
                          • Jul 2006
                          • 2051

                          Re: 3D Tic-Tac-Toe (deceptively tricky)

                          yeah that's probably way easier, I'll keep that in mind

                          I'll be honest, I haven't taken the time to optimize or clean up my code. I implemented a lot of extra functions and stuff in order to assist me with debugging. a lot of stuff, including that function, could probably be taken out. at the moment the program is just functional lol
                          Rhythm Simulation Guide
                          Comments, criticism, suggestions, contributions, etc. are all welcome.

                          Piano Etude Demon Fire sheet music

                          Comment

                          Working...