How can I make this 2 player?
Author |
Message |
Nameless_man
|
Posted: Thu Jan 20, 2005 8:00 pm Post subject: How can I make this 2 player? |
|
|
Hmm i got my codings done....(well roughly)
now how do i make it so that it works as two player?
rules: player1 starts, if they get it right, still their turn, if wrong, player2 plays, and etc and etc over and over again until the game is done.
thought about using a variable to count the turns but ive realized how dumb the user can be and can get every single try wrong so that failed.
Arrays? dunno wtf they are and how i use em so HELP PLEASE!!!
Description: |
|
 Download |
Filename: |
concentration.t |
Filesize: |
248.97 KB |
Downloaded: |
144 Time(s) |
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Cervantes

|
Posted: Thu Jan 20, 2005 8:25 pm Post subject: (No subject) |
|
|
Oww, 7000 lines of code the same code over and over again.
A simple way to do this would simply be to have a variable, that can be either 1 or 2, to keep track of who's turn it is. If they answer right, keep it as it is and add to the score of that player. Otherwise, change it.
|
|
|
|
|
 |
Nameless_man
|
Posted: Thu Jan 20, 2005 8:59 pm Post subject: (No subject) |
|
|
heh sry if u had to read all my junky lines
but i decided to do a scenario type game
=P
|
|
|
|
|
 |
basketball4ever
|
Posted: Thu Jan 20, 2005 11:30 pm Post subject: (No subject) |
|
|
do a variable: playerturn :=1
if playerturn = 1 then
your whole code thing
playerturn :=2
elsif playerturn = 2 then
your whole code thing
playerturn :=1
end if
[/code]
|
|
|
|
|
 |
Cervantes

|
Posted: Fri Jan 21, 2005 3:46 pm Post subject: (No subject) |
|
|
No... That's not very line-friendly. Even if you put the whole code in a procedure and call it within the if statement, it's not a good way to do it.
|
|
|
|
|
 |
|
|