Latticode Interface (Chess)

Latticode is a website intended to teach students intermediate-level coding. Users are able to create their own grid-based board games such as the one shown in the picture above. Even the game of chess, which is very complicated, can be coded in just 150 lines.

It is created using Django and utilizes websockets to play games with other people. We created a library called latticode to help users with the more complex parts of the game play. Users can just call functions like create_piece, set_initial_state, locs_in_radius, and many others. All they have to do is implement the functions check_status, which detects a winner, legal_moves, which lists legal moves given a board configuration, and make_move, which returns the new state of the board given a player, move position, and board configuration.

The code for Latticode can be found on GitHub. Latticode was awarded Best Education Hack at HooHacks 2019.