1 / 20

Purpose of CodeFights

Purpose of CodeFights. Prove that You are better developer. Testers sometime win as well… Coding can be fun too. History. History. Core. Fight engine – java Web application backend – php Front end – bootsrap. Supported languages. Java PHP C# More to come…. Work in progress.

Download Presentation

Purpose of CodeFights

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Purpose of CodeFights • Prove that You are better developer. • Testers sometime win as well… • Coding can be fun too.

  2. History

  3. History

  4. Core • Fight engine – java • Web application backend – php • Front end – bootsrap

  5. Supported languages • Java • PHP • C# • More to come…

  6. Work in progress • Additional security layer • REST • AngularJs web app • Mobile client

  7. Basics • Single Fighter Class • 3 actions per Move (Round) • Attacking / Blocking • Order doesn’t matter • 150 hit points

  8. Attack areas and Points • Area::NOSE – 10 pts • Area::JAW – 8 pts • Area::BELLY – 6 pts • Area::GROIN– 4 pts • Area::LEGS – 3 pts

  9. MyFighter Class • Class must implement IFighter interface • Method makeNextMove must return object of instance Move • Each round makeNextMove is called with these params: • opponentsLastMove (except first round) • myLastScore • opponentsLastScore

  10. Move API • addAttack(AREA::X) • addBlock(AREA::X) • getAtacks() • getBlocks()

  11. Sample Class

  12. Points calculation • 1st round. • Challenger: • Opponent: • Calculation • Challenger: Nose (+), Groin (-). Total: 10 • Opponent: Groin (+), Legs (-), Legs (-). Total: 4

  13. Points calculation • 2nd round. • Challenger: • Opponent: • Calculation • Challenger: Groin (+), Groin (+). Total: 4 + 4 = 8 • Opponent: Nose (-), Jaw (+), Belly (+). Total: 8 + 6 = 14

  14. Build (PHP) • Requirements: PHP 5.4 • CLI php.ini has phar.readonly flag set to false • Command line: phpbox.phar build • Or simply execute build.bat or build.sh

  15. Build (JAVA) • Requirements: JDK 1.7 • Simply execute build.bat or build.sh

  16. Try it! • Command line • php my-fighter.phar<fight_mode> • java –jar my-fighter.jar <fight_mode> • Fight manually (--fight-me) • Fight against sample bots Kickboxer and Boxer (--fight-bot <bot_name>) • Enroll Your fighter to tournament!

  17. Grab SDK and prepare fighter for tournament!

  18. Questions?

More Related