+ 2
Can anyone tell me how to create a chess game and it's logic??
5 Respostas
+ 7
with or without ai? that is the question
without ai then you need
1 to keep track of the playing pieces at anytime, a 2d array might be best or hash table if you wish
2 you need to define how each piece can move like if the user does not select the appropriate place it does not move
3 implement kill logic i.e. if moved and such piece there what to do
4 implement some other special moves like swapping the tour with the king
that's all as far as i remember
for ai well you implement the above with rules start with pure randomness then refine as you go
chess ai is a vast topic
+ 7
As your profile doesn't show more than one (very) simple web code, I guess you're near to rookie in programming... so I think it's better advised to start by coding another simplest kind of game, as hangman, guess number to grow your skills by pratice... at least, start first by doing a chess game without AI (computer opponent), and if you want later, start rather with simplest rules games board, as chess are one of the most not obvious to implement among games type ^^
+ 4
@visph tic tac toe also normally it provides a nice practice
+ 4
me too i completely forgotten it and went with chess first
till now i have to refine my ai in tic tac toe but got a nice cli game experience
+ 2
@Abdur: yes, you're right... and with advantage of being simple to do AI and having a board to handle: more close to a chess game ^^ (I'm not a gamer soul... so I don't think about all existing, but I was thinking that I forgot this better example ;P)