Refactoring structs Part 1
This commit is contained in:
30
temp/action/shuffle.c
Normal file
30
temp/action/shuffle.c
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Copyright (c) 2021 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#include "shuffle.h"
|
||||
|
||||
pokeraction_t actionShuffle() {
|
||||
return (pokeraction_t){
|
||||
.init = &actionShuffleInit,
|
||||
.update = &actionShuffleUpdate,
|
||||
.dispose = &actionShuffleDispose
|
||||
};
|
||||
}
|
||||
|
||||
void actionShuffleInit(int32_t index, void *data) {
|
||||
logText("Shuffle Deck");
|
||||
cardShuffle(GAME_STATE.deck, GAME_STATE.deckSize);
|
||||
pokerActionRemove(index);
|
||||
}
|
||||
|
||||
void actionShuffleUpdate(int32_t index, void *data) {
|
||||
|
||||
}
|
||||
|
||||
void actionShuffleDispose(int32_t index, void *data) {
|
||||
if(((shuffledata_t *)data) != NULL) ((shuffledata_t *)data)->done();
|
||||
}
|
Reference in New Issue
Block a user