Wednesday, August 30, 2023

CardChess v0.05

Soo... I've been quietly developing CardChess as an experiment in using ChatGPT and AI-powered coding techniques. So far there has definitely been an improvement over doing it myself (mainly due to my lack of knowledge with MonoGame and the finer details of C#). It's also much more fun and collaborative using it more as a pair programmer experience. 

I've recently also cleaned up the opening menu with the Leonardo.ai generated art to the left (Stable diffusion skinned system)

Below is ChatGPT's summary of the project so far..


 ChatGPT Summary: 

As of your last update, the CardChess project is in the process of implementing computer-controlled players. The game can be played between two human players, and the basic structure and rules of the game have been implemented. Here are some of the key aspects that have been worked on:
  • Game Concept: The game concept, including the rules, the board setup, the movement of the cards, and the win conditions, has been defined.
  • Board Setup: The board is set up with a 6x6 grid, and the initial positions of the cards for both players have been implemented.
  • Card Movement: The movement of the cards, including the rules for valid moves and attacking, have been implemented. The Move class has been created to handle the movement of the cards, and the PlayableCard class has StartMove and FinishMove methods to handle the start and finish of a move.
  • Win Conditions: The win condition, which is covering both kings of the opponent, has been implemented.
  • Game States: Different game states, such as the opening menu, human turn, computer turn, and game over, have been implemented.
  • UI: The opening menu has been implemented, including the play button and the background. The game state is also being exported to a JSON file for future analysis and AI learning.
  • Computer Player: The framework for a computer opponent has been started, including the GetMove method to get a move from the computer player, and the ExecuteMove method to execute the move. The Player class has a GetMove method that can be overridden by the ComputerPlayer class. Currently the computer opponent only uses random moves.
  • Animation: Implemented the animation for the movement of the cards.

Pending tasks include:
  • Computer AI: Developing multiple AI opponents.
  • Testing and Debugging: Thorough testing and debugging of the game to ensure that it runs smoothly and without errors.
  • UI Enhancement: Enhancing the user interface, including the opening menu with opponent selection, clean up the game board, and the game over screen.
  • Game Analysis and AI Learning: Implementing the game analysis and AI learning features using the exported game state.