Created
April 8, 2018 19:24
-
-
Save Devhobby/b0950a68d8bd987928446acbc21eab66 to your computer and use it in GitHub Desktop.
Realizacja przemieszczenia
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int Player::move() | |
{ | |
auto x = get_actX(); | |
auto y = get_actY(); | |
if (get_playerLastMove() == 0) { --x; set_actX(x); } | |
else if (get_playerLastMove() == 1) { ++y; set_actY(y); } | |
else if (get_playerLastMove() == 2) { ++x; set_actX(x); } | |
else if (get_playerLastMove() == 3) { --y; set_actY(y); } | |
else if (get_playerLastMove() == 4) return 3; | |
else if (get_playerLastMove() == 5) return 0; | |
else if (get_playerLastMove() == 6) return 2; | |
else return 9; | |
return 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment