Skip to content

nickylogan/saboteur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Saboteur

Final project for Game Theory/AI course.

Requirements

  • JDK 14
  • Maven (for dependency management)

Setting up

  1. Clone this repository by running:

    git clone https://github.com/nickylogan/saboteur.git
  2. Run the game by executing:

    mvn javafx:run

Making your own AI class

Create a new package in ai.impl. The package must contain at least one public class, which is your custom AI. For ease of explanation, I'll refer your custom class as FooAI. Don't be afraid to name it something else.

FooAI must extend AI, and the only method you must override is makeDecision(), which will be called automatically when the game prompts you to move.

IMPORTANT: The makeDecision method timeouts after 5 seconds. Make sure your implementation doesn't take too long to finish.

Here's an example short snippet of FooAI:

public class FooAI extends AI {
    public FooAI() { super("Foo"); }

    @Override
    public Move makeDecision() {
        // do something here
        return move;
    }
}

See ai.impl.example or ai.impl.random for more sophisticated implementations.

Controls

Action Control
Select a card Left-click on any card on the bottom pane
Place a card Right-click on the desired position
Target a player Left-click on the targeted player
Rotate a card Press R
Discard a selected card Press D

Documentation

Please read the JavaDoc. If you feel lost, you can check out the class diagram

Contributing

Fork this repository and create a new pull request. Please provide a clear summary of your changes.

Bug reports and issues 🐞

Should any issue or bug occur, please open a new issue, or directly PM me.

Authors

AI Authors

About

A Saboteur game implemented in Java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published