-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to Super Farmer wiki.
Game is split into rounds, and each split into players turn, which split in two phases. 1st phase is trading phase, where player can make one exchange with player or bank. Exchange is restricted to global rules. 2nd phase is breeding phase, where players throws two 12 edge dice and breed animals, that have been shown. For each pair of animals on dices and in your herd of these kind, you get new one of its kind from bank. However, if dice will show fox, you have to discard all rabbits in your herd, and if it will show wolf, you have to discard all animals except horse. You can prevent these loses, if you have dog in your herd. Small dogs prevent from fox effect, big dogs prevent from wolf effect.
Game will be available here. Shortcut of all windows.
To install this application, you have to install Git and Node.js on your machine. After that use git clone https://github.com/Front-znad-zatoki/super-farmer.git
, enter downloaded directory and use npm i
to install application.
After you have installed application, call start:dev script or simply use npm run start:dev
in your command line in super-farmer directory. Application will be available on 127.0.0.1:8765
Write your code in a clear and understandable for everyone way. Remember about Clean Code, SOLID, DRY and KISS rules. Keep each component in separate file.
Don’t style by tags or ID, use classes. When you write CSS remember about right order:
- Position,
- Box modeling,
- Rest.
And remember to write a test before you start writing a method. While writing a test keep FIRST rules.
Push changes at least at the end of day, commit changes after you have finished some part of your task.
Use pascal case in reusable components (i.e. MenuButton
), and camel case in typescript filenames and class/method/variable names (i.e. getRandomAnswer
).
We are using jest as our main testing tool. For E2E testing we will use cypress. To run all tests run script from IDE or type npm run test
in console. Also you can check coverage of our code by typing npm run test:cov
. Do not test plain objects and get/set methods.
Don’t commit to develop or main branches. Create an individual branch for every bug/feature. Follow that naming convention:
<type of issue>/#<number of issue>-<name referring to issue title>
Create branch from up-to-date develop branch. Before creating pull request merge your branch with develop and resolve eventual conflicts. Remember to format your code with format script (npm run format
) and push changes to origin. In every PR should be at least two reviewers, where one of them should be Techlead or someone indicated by him. In pull request description write closes #.
Write // FIX:
and // TODO:
with short description, if you have to wait for other part to be finished or you have to solve some problems, it will help to understand problem and allow other member of team to help you solve it. Try to write your code clearly, so there will be no need of more comments (unless you have to name variable or method with 100 character name).
- SCSS
- BEM
- HTML
- TypeScript
- Parcel
- Lodash
- Jest
- Cypress
TDD: https://www.samouczekprogramisty.pl/test-driven-development-na-przykladzie/
OOP: https://mansfeld.pl/programowanie/zalety-i-wady-oop/
BEM: http://getbem.com/
DRY: https://thevaluable.dev/dry-principle-cost-benefit-example/