Skip to content

Createjoin game#64

Open
ZachBerman wants to merge 11 commits into
masterfrom
createjoin_game
Open

Createjoin game#64
ZachBerman wants to merge 11 commits into
masterfrom
createjoin_game

Conversation

@ZachBerman

@ZachBerman ZachBerman commented Sep 3, 2016

Copy link
Copy Markdown
Contributor

-Add functionality to create new game & join existing game
-Add stats to games#index
-Add username field

def create
@game = Game.new
@game = Game.create
@game.white.update(user_id: current_user.id)

@lasley lasley Sep 4, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this doing? IIRC there isn't a white attribute on game NVM

@lasley lasley Sep 4, 2016

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is performing three db writes + a read, and is inefficient. The game should be created and populated with the player all in one fell swoop.

@lasley lasley changed the title Createjoin game [WIP] Createjoin game Sep 4, 2016
@lasley

lasley commented Sep 7, 2016

Copy link
Copy Markdown
Contributor

Ahh cool works for me then 👍

@lasley lasley changed the title [WIP] Createjoin game Createjoin game Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants