All Projects β†’ JSJitsu β†’ Hero Starter

JSJitsu / Hero Starter

Hero code needed to play the game.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Hero Starter

Dvc
πŸ¦‰Data Version Control | Git for Data & Models | ML Experiments Management
Stars: ✭ 9,004 (+24911.11%)
Mutual labels:  hacktoberfest
Open Oni
Open ONI (Open Online Newspaper Initiative) Django web app
Stars: ✭ 35 (-2.78%)
Mutual labels:  hacktoberfest
Laravel Weather
🌀️ A wrapper around Open Weather Map API (Current weather)
Stars: ✭ 36 (+0%)
Mutual labels:  hacktoberfest
Hacktoberchallenges2018
Welcome! I need some help making my list... Learn how in the README
Stars: ✭ 35 (-2.78%)
Mutual labels:  hacktoberfest
Lol Qwop
Everyone who has a merged pull request is invited to become an admin of this repo.
Stars: ✭ 35 (-2.78%)
Mutual labels:  hacktoberfest
Hwp.js
Open source hwp viewer and parser library powered by web technology
Stars: ✭ 980 (+2622.22%)
Mutual labels:  hacktoberfest
Mahapps.metro
A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
Stars: ✭ 8,023 (+22186.11%)
Mutual labels:  hacktoberfest
Monero Gui Guide
Guide for the Monero GUI wallet
Stars: ✭ 36 (+0%)
Mutual labels:  hacktoberfest
Gh License
Scan your online repo, check if it is missing the license or install the Git Hooks
Stars: ✭ 35 (-2.78%)
Mutual labels:  hacktoberfest
Wire Webapp
πŸ‘½ Wire for web
Stars: ✭ 982 (+2627.78%)
Mutual labels:  hacktoberfest
Yii2 Queue
Yii2 Queue Extension. Supports DB, Redis, RabbitMQ, Beanstalk and Gearman
Stars: ✭ 977 (+2613.89%)
Mutual labels:  hacktoberfest
Emoji Dictionary
Convert emoji names in unicode characters and vice versa.
Stars: ✭ 35 (-2.78%)
Mutual labels:  hacktoberfest
Fabric Sdk Java
Stars: ✭ 982 (+2627.78%)
Mutual labels:  hacktoberfest
Eslint Plugin Wc
ESLint rules for Web Components
Stars: ✭ 35 (-2.78%)
Mutual labels:  hacktoberfest
Merge Branch
A GitHub Action that merge PR branch to other branchs
Stars: ✭ 36 (+0%)
Mutual labels:  hacktoberfest
Electron Packager
Electron Packager is a command line tool and Node.js library that bundles Electron-based application source code with a renamed Electron executable and supporting files into folders ready for distribution.
Stars: ✭ 7,860 (+21733.33%)
Mutual labels:  hacktoberfest
Flypie
Flysystem plugin for CakePHP
Stars: ✭ 35 (-2.78%)
Mutual labels:  hacktoberfest
Nvquicksite
nvQuickSite is a desktop installation app for DNN, the world's most popular ASP.NET-based CMS. This app allows you to easily install DNN onto any environment that meets the minimum system requirements for DNN to be installed.
Stars: ✭ 36 (+0%)
Mutual labels:  hacktoberfest
Ns Vue Radio
A native white-label application built with NativeScript-Vue for community radios
Stars: ✭ 36 (+0%)
Mutual labels:  hacktoberfest
Megadraft
Megadraft is a Rich Text editor built on top of Facebook's Draft.JS featuring a nice default base of components and extensibility
Stars: ✭ 982 (+2627.78%)
Mutual labels:  hacktoberfest

Build Status

JavaScript Fight Club - Hero Starter

Getting Started

If you are anxious to join the fight, all you need to do is fork this repo and sign in to the game. It's that easy.

You must know a little bit of Git to get started. If you already know it, skip to step 3.

Steps

  1. Install Git.
  2. Learn to fork.
  3. Fork this repo so you have your own hero-starter.
  4. Enroll your hero by signing in to the JavaScript Fight Club game.

Changing the Hero

Basic Skills

This game is played by writing JavaScript code. If you have never used JavaScript before, the following resources can help:

Making Your Hero Smarter (or not)

If you take a look at hero.js, you will notice that there are different move functions. Each function describes a specific type of hero behavior.

  • The Northerner cares about moving North... all the time.
  • The Blind Man moves randomly around the board.
  • The Unwise Assassin only cares about killing other players, possibly to his own demise.
  • The Careful Assassin goes after other players as well, but cares more about his health than the "Unwise Assassin."
  • The Safe Diamond Miner cares about mining diamonds and making sure he or she is alive at the end of the game to enjoy the wealth.
  • The Selfish Diamond Miner cares about mining diamonds, but will also capture his own team's diamond mines.
  • The Coward will find the nearest health well and stay there.

If you want to try something different, change the move toward the bottom of the file and try it out. You can save your changes and push them back to Github (readying your hero for the next battle) or you can test the change locally to see if that's how you want your hero to behave.

Once you get acclimated to the different types of heroes and think you want to give writing your own hero a shot, try altering some of the code. You might ask yourself:

  • What if my miner waited longer before going to a health well?
  • What if my health nut was aware of where the nearest enemy was and tried to keep away?
  • Can I change my aggressor to became a berserker?

The possibilities are endless! Go crazy and change your hero however you want. Just remember to track your changes with Git.

If you are looking for even more of a challenge, take a look at the helpers.js file and begin picking apart our helper methods. Is there any way you could adapt our path-finding algorithm and use a variant in your hero.js file? What other helper methods should be available to your hero that we did not include?

Your hero has the potential to behave in any way you decide. Every change you make could alter the outcome of the game. You can be a lone wolf or a team player. You can heal or you can hurt. It is all up to you.

Testing and Training

You can still test your hero code locally! After you have Node.js installed, there are two ways to do this:

Option A: Check for code errors

On the command line, navigate to your hero code directory, and type the following commands:

npm install
npm run sanity

If the tests pass, your code doesn't have any obvious errors.

Option B: Have a test battle

Running the battle

On the command line, navigate to your hero-starter directory, and type the following command:

node test-battle.js

This will run a test battle of only 15 turns which takes place on a 5x5 game board against a single enemy. The script will output what the board looks like at each turn, and the moves your hero tried to make.

More Options

You can modify how the test battle runs by passing the following options:

Flag Description
--help output usage information
--wait Turn by turn step through of the battle
--turns Specifies how many turns to run

Understanding the output

  • Your hero will be denoted by the code "H00".
  • The enemy will be denoted by the code "H01".
  • Diamond mines will be denoted by "DXX" where the Xs are numbers.
  • Health wells will be denoted by "WWW".

Can I commit changes to the test script?

Absolutely! We only use your hero.js and helpers.js files for the live game, so feel free to do whatever you like with the rest of the files.

Game Rules

Win Conditions

The game is decided in one of two ways:

  1. A team eliminates all of the other team's heroes or...
  2. After 1,250 turns, a team collects the most diamonds.

Turns

These are the events that occur in one hero's turn, assuming the hero has some health left:

  1. We take the direction that your hero wants to go (ie - the direction that your move function returned) and ask if it is a valid coordinate. If it is, we move your hero to that tile. If not, your hero stays put.
  2. If the tile your hero wants to move to is...
    • ... unoccupied, your hero moves on to that tile.
    • ... a fallen hero, your hero will steal their soul.
    • ... a diamond mine, then your hero will capture the diamond mine, but will not move on to that tile. Additionally, your hero will receive 20 damage because diamond mines are perilous.
    • ... a health well, then your hero will receive 30 health, but will not move on to that tile.
    • ... an enemy hero, then your hero will deal 10 damage to the enemy hero, but will not move to that tile.
    • ... a friendly hero, then the friendly hero will receive 40 health, but your hero will not move on to that tile.
  3. If your hero is still alive after moving, then your hero deals 20 damage to any enemy hero on an adjacent tile. This is in addition to the specific damage done by moving directly into an enemy.
  4. After this, your hero's turn is over and we increment the game's turn and move on to the next hero.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].