Skip to content

felipeaffonso/rpg-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPG Game - The Coffee Journey

              ., '''''''''''''''''' ,.
           .'   .oooooo$$$$$ooooooo.   '.
          ::  ,$$$$$$$$$$$$$$$$$$$$$$,  ',
          |;  '$$$$$$$$$$$$$$$$$$$$$$'    ''''''''''.
          |;     ''''''$$$$$'''''''       ,:''''':, |
          |;   '|                   |'    ||      | |
          |;   '|                   |'    ||      | |
          |;   '|                   |'    ||      | |
          |;   '|                   |'    ||      | |
          |;   '|                   |'    ':.....:' |
          |;   '|                   |'     ,,,,,,,,,'
          |;   '|                   |'    ;
          |;.   |                   |   .'
           '||,,,                   ,,,;'
              ''';;;;,,,,,,,,,,,;;;;'''
                     '''''''''''

Table of Contents

Introduction

At this game, you are a Software Developer that is trying to do what we do every day: Drink Coffee! You can choose your Programming Language, but you have to think with your brain, not with your heart S2!

Here is the dynamics:

You are now at your desk with Slack window opened and with a lot of notifications blinking!

Each slack message could have a good or bad surprise, that guides you in our path to Coffee Nirvana, when you everything become shiny and clear (this is the end of the game).

But... I don't think only good thinks are going to happen! You will need to correct a lot of bugs and solve a lot of problems too.

If your caffeine level reach ZERO, then you are DEAD

I wish you good luck!

Technical Info

The software was developed using the following tools/platforms:

Requirements

In order to run the game, you need to have installed at your environment:

  1. Java 8
  2. Maven

Usage

First, you have to generate the jar with mvn:

$ mvn clean install

You are ready to run with the command:

$ java -jar target/rpg-game-1.0-SNAPSHOT.jar 

Follow the instructions on screen and enjoy your coffee

Test Coverage

  1. Exceptions were not tested.
  2. Main class was nos tested
  3. InputUtils and FileUtils were removed from Jacoco Coverage because of an incompatibility between Jacoco and PowerMock
  4. InputUtils and FileUtils coverage tests are not working at IntelliJ with the Coverage option, but Run and Debug is OK

Developer Considerations

It was a very hard, intense and fun challenge! I really enjoyed making it!

The requirement that tells that we CAN'T use any library (only using for tests) makes the challenge more complicated.

As we are using Spring, Lombok and other libraries, somethings we forget how the things works behind the scene.

Cohesion and Coupling comes to our mind all the time. At this time you miss so much: @Autowired, @Bean, @DefaultArgsConstructor and so many code tricks that we use every day.

For the models, I don't like them Anemic, so I put the "Business" methods there, like takeDamage or drinkCoffee, following Object Oriented programming principles.

Testing is very important for me, so I used Jacoco to help me, telling the methods, lines and branches that I could possibly have forgot to test.

I have used some Factory and Command Patterns for the Actions in my game, and then I could have integers as keys in Maps that contains all the available commands to execute.

To be honest, I made myself very happy doing this challenge, this kind of thing makes us better every day.

The Game is extensible, you can add new actions at each part. Also you can add new Fight Actions.

Thinking in other markets, the string messages are externalized, so you can translate to any language. (The majority strings).

Practicing, Practicing and Practicing...

About

RPG Console Terminal Challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages