Skip to content

WIP: Moving javascript to js files, making an api class#8

Open
smith11235 wants to merge 23 commits into
masterfrom
moving-javascript
Open

WIP: Moving javascript to js files, making an api class#8
smith11235 wants to merge 23 commits into
masterfrom
moving-javascript

Conversation

@smith11235

Copy link
Copy Markdown
Collaborator
  • note: this pr will be much easier to understand when first pr is merged
  • moving javascript from games#show.html to a js file and making it an object/api for standard usage
  • removing card model in favor of integer system
    • simpler support of logic in ruby & javascript
    •    deck = (0..51).to_a.shuffle
         card = deck.first
         suit = card % 4
         number = card % 13
      
  • when passing data to frontend, only need to pass 'card'

@smith11235

Copy link
Copy Markdown
Collaborator Author

this is close to working. For some reason it is not finding the canvas elements. Or maybe its something to do with the weird inclusion of cards.js.erb.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

s/Suite/Suit/

@gwilbur

gwilbur commented May 11, 2015

Copy link
Copy Markdown
Collaborator

You should probably stick to one pull request at a time because this has all your changes from the other one. It makes it tough to see what this request specifically changes vs the other one.

@smith11235

Copy link
Copy Markdown
Collaborator Author

well, i'd like to merge the first one.

but yes. i was going crazy in the night refactoring tons of shit in this
one too.

On Mon, May 11, 2015 at 10:12 AM, Greg Wilbur notifications@github.com
wrote:

You should probably stick to one pull request at a time because this has
all your changes from the other one. It makes it tough to see what this
request specifically changes vs the other one.


Reply to this email directly or view it on GitHub
#8 (comment).

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