castlepanic's People
castlepanic's Issues
win/lose
id: 12 As a user, I would like to have a message displayed if I win the game
id: 13 As a user, I would like to have a message displayed if I lose the game
Draw cards
ID: 14
As a user, I would like to draw cards at the beginning of my turn
Testing position, front end
Create Player Class
We'll need a player class that we assign players to.
It needs to be able to hold a hand assigned to playerid
Create a Component for Creating Game Sessions
Create a Angular Component to display on the front end, that will allow a user to create a game session
Create Game State Object
ID: 9
As a developer, I would like an object to represent the state of the game
Create backend for joining Game Session
hints
id: 7 As a user, I would like to see hints when I see a new card / monster
Testing Deck, Cards
Place monsters in starting positions
ID: 15
As a developer, I would like to place monsters in random positions at the beginning of the game.
Create UI Component for Joining a Game Session
rejoin a game session
id: 2 As a user, I want to be able to rejoin a game session if disconnected
/api/endTurn
Join a Game Session
ID: 3
As a user, I would like to join a game session by entering the game code and a user nickname
Testing Game Session
Create a Game Session on the Backend
Accept a json object from a post message and create a new game session in the database, returning the results. The database should have tables for Games(code) and Users(id,name,game_code).
The json post message should be sent to the url /api/newGame and the server will return a json object with the format {"gameCode": code}
/api/playCard
Tells the backend that what card the user is playing. Should accept a json object containing:
{
gameCode
name
cardIndex
monsterIndex
}
The backend should check that the cardIndex and monsterIndex are valid first as well as whether or not it is the users turn. Then play the card appropriately and return a result to the front-end:
{
success
error // if error exists
}
This will require you to start integrating some of the components that we have built together.
Create Game Session
ID: 1
As a user, I would like to create a game session and receive a “easy to remember” code that allows other players to join the game session I’ve created.
Setup MySQL Database
ID: 8
As a developer, I would like to connect to a mysql database
Testing GameState, Player
Testing api, database, monster classes
Implement Towers/walls
back-end for lobby
Create an api endpoint so that the front-end can request information about a game-session.
The front-end should send a post message to /api/lobby with a json object containing (name, gameCode) and the back-end should return a json object like this:
{
"role": "player", //role of user
"Users": [] //Array of usernames in game session
}
Create Monster class
Should hold hp, effects, etc.
2 users enter the same name
Currently if 2 users enter in the same name to join the same session they will both be added to the game session with the same name.
The back-end should check if the username already exists in the game session and if it does it should return an error.
The front-end should ask the user to choose a different name if it receives this error.
UPDATE 9/28/17 12pm
The front end for joining a game session is not finished yet, so I just added the fix to the backend. /api/joinGame will return
{
"success": false
"error": "user already exists"
}
We should make sure we have the front end working before closing this issue
require username for /api/newGame
require username for /api/newGame and add user to game
Create a Lobby Component
Build a Angular Component to display the users in the game session as well as the game code for the session. The list of users should update periodically, so when a new user joins they are displayed. The user that created the game session should have the ability to start the game.
Gamestate needs to check if a card can be played at a position the player is playing it
/*
so we can handle the logic of checking if a card can be played at a certain position in a few different ways
the way that I'm assuming we're doing is making it so that when the player attempts to play it, the card
checks that it can be placed in the position. If so, something like this should be used.
NOTE: THIS IS DONE USING THE ASSUMPTION THAT THE PLAYER CLASS (or whatever class we use) UTILIZES A POSITION FUNCTION
WHEN DECIDING WHERE TO PLACE A CARD
public canPlace(Player player): boolean{
if(player.position.ring === this.ring && player.position.color === this.color){
return true;
}
else{
printf("You can't play that card there!\n");
return false;
}
}
*/
Create Deck to draw from
We need the player deck and the monster deck
Check Monster.ts please
I'm looking it over, and I'm concerned that we don't have a set of monsters that will be defeated in the game.
In other words, we have the monsters created but we don't have any arrays or databases with the number of monsters that are going to be in the game.
We'll need that, we'll need something that randomizes the order they're in, and we'll need something to remove monsters from it.
/api/getGame
This api endpoint should get the current state of the game and return it to the front-end. The front-end should send
{
gameCode
name
}
And it should return:
{
success
error // if an error occurred
gameState
}
You should make sure that the name is in the GameSession and the gameSession exists before attempting to return a gameState
/api/startGame
Create an api Endpoint that will allow the owner of the game session to start the game. This api should trigger the initialization of several objects in the game.
The front end should send the name of the user submitting the request and the gameCode of the game session.
The server should return a success or failure.
We also need to go back a prevent a user from joining the gameSession after the game has already started.
Complete project for us
build UI Component to display game
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.