PikaDaDon
Thunderbolt Them Suckers
look at this outrageous portfolio: NuuNeoI's Interactive Profile
That shyt is dope. Showed it to a friend, turns out he created that over a year ago I thinklook at this outrageous portfolio: NuuNeoI's Interactive Profile
Either way that's a dope design. I kind of want to borrow it myself lolLeave it to white folks to steal the idea: Robby Leonardi | hey@rleonardi.com
Have you done any programming before this?Reached the first milestone project on my Udemy Python course....
...a tictactoe game.
Thinking of setting up the board as a series of three lists, like this...(I don't know how to set up a matrix yet)
[1,2,3]
[4,5,6]
[7,8,9]
Then creating a function / loop that asks the Player where they'd ike to place their X (player 1), or O (player 2).
Then add logic that checks if there are three X/O's aligned and have that player win the game.
Will report back and post the code here later...
Reached the first milestone project on my Udemy Python course....
...a tictactoe game.
Thinking of setting up the board as a series of three lists, like this...(I don't know how to set up a matrix yet)
[1,2,3]
[4,5,6]
[7,8,9]
Then creating a function / loop that asks the Player where they'd ike to place their X (player 1), or O (player 2).
Then add logic that checks if there are three X/O's aligned and have that player win the game.
Will report back and post the code here later...
How would you track who is in which spot?Use a 2D boolean array instead.
[
[false,true,false],
[false,true,false],
[false,true,false]
]
How would you track who is in which spot?
Certainly an option. What would be your plan to translate from 0-2 to Xs and Os when printing out the game board?I should have thought about that. Good catch.
Maybe a 2D array and use int 0-2; 0 for blank space and 1 and 2 for X and O?
[
[0,1,0],
[0,1,0],
[0,2,0]
]
Nope.Have you done any programming before this?
good luck.Nope.
Certainly an option. What would be your plan to translate from 0-2 to Xs and Os when printing out the game board?
Interesting :jbhmmdup:. But is that necessary with how Python prints arrays?two for loops then if else statements to check if X or O
for(row)
for(column)
if(array[row][column] == 1){
string+= ' X';
} else if(2){
} else {
}
}
or could just save String in the 2D array depends.