Skip to content

TA-2016-NodeJs-Team2/Telerik-Racer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

171 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telerik-Racer

Models

  • User

    • username {String}
    • password {String}
    • role {String}
    • cars {[Object]}
    • money {Number} without float numbers
    • rank {Number}
    • dateRegistered {Date}
    • respect {Number}
    • level {Number} Depends on respect
    • token {String} generate on login
    • lastLogindate {Date}
    • busyUnit {Date} DateTime().now + busyHours
  • Race

    • dateCreated {Date}
    • users {[Object]} / {[String]} (UserNamesOnly)
    • status {String}
    • map {String} / {Object}
  • Car

    • price {Number}
    • model {String}
    • wheelsLevel {Number}
    • engineLevel {Number}
    • turbo {Number} [0-100]
    • urlImage {String}
    • dateCreated {Data}
    • levelRequired {Number}
    • damage {Number} car status. 100 - broken
  • Map

    • name {String}
    • prizes {[Number]} money which users will earn after race is finished
    • respectGiven {[Number]} Same as prizes, and user can gain levels
    • damageToTake {Number} Damage to take from each
  • Job

    • name {String}
    • money {Number}
    • busyHours {Number} user will earn money after that hours. User cannot participate in race while working

Routes

  • / - home page (public) with nav bar, footer
  • api/users/
    • GET /register displays a register form (public)
    • GET /login displays a login form (public)
    • POST /register (public)
    • POST /login (public)
  • api/admin/ (only for administrator)
    • GET /users?page=1&size=10&sort=asc&by=username - lists all users (default values if no query params provided)
      • Should have links to user's details. May use Kedno Grid
    • GET /users/:id - details about user
      • Should have buttons for delete and Update (role, money, username)
    • DELETE /users/:id - delete user from db
    • PUT /users/:id - update user properties (role, money, username)
  • races/
    • GET /all?page=1&size10&sort=desc&by=date - (public) lists latest races
      • Should have links to races's details. May use Kedno Grid
    • GET /add (private registered users only) shows a form for create a race. User can choice a map only by name (dropdown) the user should provide a car (from his bought cars)
    • POST /add (private) creates a new race
    • GET /:id (private) details about race, status, (ranking if finished)
    • PUT /:id (private) user provides a car and joins into race. Car should not have damage 100%
    • POST /:id/start (private) some logic when the race will start (the user creator of the race can starts)
      • game logic should give rewards on users
  • shop/cars/
    • GET /all?page=1&size10&sort=desc&by=model - (private) cars
      • Should have links to cars's details. May use Kedno Grid
    • GET /:id (private) car details, money, engine level etc.
      • if user does'n have this car in collection, should have option to buy it
    • POST /:id/buy (private) if user have enough money, car is added to collection
    • GET /add (moderator and administrators only) form for creating a car
    • POST /add (moderator and administrators only) - if time is enough will be implemented
    • DELETE /:id/remove (administrators only) - if time is enough will be implemented
  • maps/ (moderators and administrators)
    • GET /all?page=1&size10&sort=desc&by=name - lists maps
      • Should have links to maps's details. May use Kedno Grid
    • GET /:id damage to take from cars, and prizes.
    • GET /add form for creating a map
    • POST /add adds a map
    • DELETE /:id/remove (administrator only) if time is enough will be implemented
  • profile/ (private)
    • GET / user info
    • GET /cars user cars
    • GET /cars/:model car details where user should have an option to repair the car, if any damage is taken
    • PUT /cars/:model/repair if user has enough money.
  • jobs/ (private) if time is enough will be implemented
    • GET /all some jobs with buttons. Then clicked start working to earn money after N hours
    • PUT /:id/ user cannot get another work, or race until this job is finished

Game logic

User can buy a car. User makes a race with one of his cars. Other users can join while provide a car to race with. 
The race can be started when there are more than one user. After race, first five users receive a respect and money
depends on map. For each car in the race deal a damage depends on map. When respect is enough user can gain a level
and new cars are unlocked in shop. Users should repair cars.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors