32 lines
		
	
	
		
			726 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			726 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /**
 | |
|  * Copyright (c) 2021 Dominic Masters
 | |
|  * 
 | |
|  * This software is released under the MIT License.
 | |
|  * https://opensource.org/licenses/MIT
 | |
|  */
 | |
| 
 | |
| #include "round.h"
 | |
| 
 | |
| void _pokerActionRoundOnStart(queue_t *queue, queueaction_t *action ,uint8_t i){
 | |
|   poker_t *poker;
 | |
|   poker = (poker_t *)action->data;
 | |
| 
 | |
|   // TODO: Fix State
 | |
|   // poker->state = POKER_STATE_STARTING_ROUND;
 | |
| 
 | |
|   // Prepare the initial game stat
 | |
|   pokerResetRound(poker);
 | |
| 
 | |
|   // Decide on the dealer
 | |
|   pokerNewDealer(poker);
 | |
|   
 | |
|   queueNext(queue);
 | |
| }
 | |
| 
 | |
| queueaction_t * pokerActionRoundAdd(queue_t *queue, poker_t *poker) {
 | |
|   queueaction_t *action;
 | |
|   action = queueAdd(queue);
 | |
|   action->data = (void *)poker;
 | |
|   action->onStart = &_pokerActionRoundOnStart;
 | |
|   return action;
 | |
| } |