post  Too far?

DrChill (308)   Link to this post
So I finaly decided to make the tic tac toe game, and I am wondering if this has gone too far?

I am checking each blank if it has been pressed, perform an action (printing for now)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
if (blankTopLeft.isDown(event)){cout << "a1\n"
      }
      if (blankTopMiddle.isDown(event)){cout << "a2\n"
      }
      if (blankTopRight.isDown(event)){cout << "a3\n"
      }
		
      if (blankCenterLeft.isDown(event)){cout << "b1\n"
      }
      if (blankCenterMiddle.isDown(event)){cout << "b2\n"
      }
      if (blankCenterRight.isDown(event)){cout << "b3\n"
      }

      if (blankBottomLeft.isDown(event)){cout << "c1\n"
	}
	if (blankBottomMiddle.isDown(event)){cout << "c2\n"
	}
	if (blankBottomRight.isDown(event)){cout << "c3\n"
	}
chrisname (1342)   Link to this post
what is this i don't even

What're you trying to do here?
DrChill (308)   Link to this post
sorry, I am polling all the button for whether or not they're pressed. If they are they print text unique to each press.
chrisname (1342)   Link to this post
Yes but what is the supposed outcome of this?
DrChill (308)   Link to this post
All the buttons will later perform actions changing them to either x or o, and if too far what is my alternative?
chrisname (1342)   Link to this post
What do you mean 'too far'? Do you mean "am I going too far with this?"
If so, I don't think so, but I still don't really understand what you're doing.
DrChill (308)   Link to this post
How do normal people poll for ticTacToe events?
chrisname (1342)   Link to this post
I have no idea. Gamedev isn't my thing...
helios (4790)   Link to this post
Uh...
1
2
3
for (int y=0;y<3;y++)
    for (int x=0;x<3;x++)
        if (black[x][y].isDown(event))
DrChill (308)   Link to this post
omg Helios you have saved me much repetitive typing, I salute you.

Registered users can post in this forum.