Skip to content

PlayHex, a board game, as the homework of the course 'JAVA and Object-Oriented Programming' in Tsinghua University in 2023.(清华大学 2023 年《Java 语言程序设计》课程大作业)

License

Notifications You must be signed in to change notification settings

Timothy-Liuxf/PlayHex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlayHex


Languages


Description

PlayHex, a board game, as the homework of the course 'JAVA and Object-Oriented Programming' in Tsinghua University in 2023.

Platform

Java 17

Copyright

MIT LICENSE

Overview

overview

Game Rules

The red and blue sides take turns moving, with red going first. During each turn, players can choose one of their own chess pieces and move it in any direction by 1 to 2 squares (the destination square must be an empty space on the board). If a player chooses to move 1 square, the original chess piece remains in place after landing on the target square, thus increasing the total number of pieces by one. If a player chooses to move 2 squares, the original chess piece disappears after landing on the target square, keeping the total number of pieces unchanged.

When a player makes a move and there are opponent's chess pieces in the adjacent squares (1 square away), all those pieces are captured, meaning they change color. If a player's turn comes up and they are unable to make a move, the remaining empty spaces are filled with the other player's chess pieces, and the game ends. The side with more chess pieces on the board wins.

Operation

  • "WASD" or arrow keys to move cursor
  • "Enter" or "Space" to select
  • "Q", "Esc" or "Numpad 0" to cancel selection

Thank you for playing!

About

PlayHex, a board game, as the homework of the course 'JAVA and Object-Oriented Programming' in Tsinghua University in 2023.(清华大学 2023 年《Java 语言程序设计》课程大作业)

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages