Created
February 14, 2017 04:03
-
-
Save JCaraballo113/105f7fe7dcb5ee23b295e196da1c281d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { View, Text, TextInput } from 'react-native'; | |
import {Button, Card, CardSection } from './common'; | |
export default class CardDeck extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
remainingCards: 52, | |
numberOfAces: 4, | |
numberOfJacks: 4, | |
numberOfClubs: 4, | |
} | |
} | |
drawNextCard() { | |
// Draw your next card | |
} | |
discardNumCards(cardsToDiscard) { | |
this.setState({ | |
...this.state, | |
remainingCards: this.state.remainingCards - cardsToDiscard | |
}); | |
} | |
shuffleDeck() { | |
// Shuffle deck | |
} | |
render() { | |
return ( | |
<View> | |
</View> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment