Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

runekrauss/carrots-hunting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Carrots Hunting

Carrots Hunting is a game about collecting carrots with a rabbit on a game field, without being eliminated by enemies in the form of archers and wolves.

Game Field

🎯 Features

  • Multiple levels
  • Design of own levels
  • Pattern movement for NPCs
  • Collision detection of players

🚀 Getting Started

🔧 Installation

To play this game, you just need to download and install Greenfoot according to the instructions.

💻 Usage

Open Greenfoot and import CarrotsHunting. Then compile this game and run it by clicking the button labeled Run.

👀 Examples

🔶 Designing Your Own Level

To build your own level, you need to define a text file following a certain scheme:

{{""},{""},{""},{""},{""},{""},{""},{""},{""}},
{{""},{""},{""},{""},{""},{""},{""},{""},{""}},
{{""},{""},{""},{""},{""},{""},{""},{""},{""}},
{{""},{""},{""},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GSE"},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GNWSE"},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GNW","GSE"},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GNWSE"},{""},{""},{""},{""},{""},{""}},
{{"GSW","GSE"},{"GSWNE"},{"GNW","GNE","GSW"},{"GSWNE"},{"GNE","GSE"},{""},{""},{""},{""}},
{{"GNWSE"},{""},{""},{""},{"GNWSE"},{""},{""},{""},{""}},
{{"GSE","GNW"},{""},{""},{""},{"GSW","GSE","GNW"},{"GSWNE"},{"GSW","GNE"},{"GSWNE"},{"GNE"}},
{{"GNWSE"},{""},{""},{""},{"GNWSE"},{""},{""},{""},{""}},
{{"GSW","GNW"},{"GSWNE"},{"GSE","GNE","GSW"},{"GSWNE"},{"GNE","GNW"},{""},{""},{""},{""}},
{{""},{""},{"GNWSE"},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GNW","GSE"},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GNWSE"},{""},{""},{""},{""},{""},{""}},
{{""},{""},{"GNW"},{""},{""},{""},{""},{""},{""}}
1
1
8 
1 
1

The first sequence describes the grid layout using coordinates. The following values describe the location for eliminated players: origin x, origin y, initial position, increment of mover, and direction of rotation.

🔶 Using the Optional Server

Furthermore, there is a server in the directory Server that manages likes by users. In order to use this server, it must be compiled and started via java -jar Server.jar. The game will then try to establish a connection for communicating. The server can be terminated via the command stop.

✅ Tests

In addition to UI tests such as reading levels, various unit tests were performed: The corresponding test classes have the suffix Test and can be executed directly in Greenfoot.

📖 Documentation

Analogous to the tests, the documentation can also be accessed directly in Greenfoot. For this purpose, open the source code of a respective file and simply switch to the documentation.

⚠️ License

Carrots Hunting is licensed under the terms of the MIT license.

🏆 Award

Carrots Hunting took 2nd place for Best Game of the student course Praktische Informatik 1 at University of Bremen in 2016.

About

A game where a rabbit has to collect carrots and beware of enemies

Topics

Resources

License

Stars

Watchers

Forks