Finish effect data type
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				ci/woodpecker/push/woodpecker Pipeline was successful
				
			
		
		
	
	
		
	
		
			All checks were successful
		
		
	
	ci/woodpecker/push/woodpecker Pipeline was successful
				
			This commit is contained in:
		
					parent
					
						
							
								7e21d9b274
							
						
					
				
			
			
				commit
				
					
						b551179ba7
					
				
			
		
					 3 changed files with 11 additions and 5 deletions
				
			
		
							
								
								
									
										12
									
								
								src/cards.rs
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/cards.rs
									
										
									
									
									
								
							| 
						 | 
					@ -1,12 +1,13 @@
 | 
				
			||||||
use std::borrow::Cow;
 | 
					use std::borrow::Cow;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use serde::Deserialize;
 | 
				
			||||||
use yoke::Yokeable;
 | 
					use yoke::Yokeable;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use super::player::Position;
 | 
					use super::player::Position;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// A card in a players deck which can apply an effect
 | 
					/// A card in a players deck which can apply an effect
 | 
				
			||||||
/// to the game or advance a solution
 | 
					/// to the game or advance a solution
 | 
				
			||||||
#[derive(Yokeable)]
 | 
					#[derive(Yokeable, Deserialize)]
 | 
				
			||||||
pub struct ActionCard<'a> {
 | 
					pub struct ActionCard<'a> {
 | 
				
			||||||
    /// How much influence the card will cost to play
 | 
					    /// How much influence the card will cost to play
 | 
				
			||||||
    influence: i32,
 | 
					    influence: i32,
 | 
				
			||||||
| 
						 | 
					@ -21,7 +22,7 @@ pub struct ActionCard<'a> {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// A card which must be solved by someone on the politburo
 | 
					/// A card which must be solved by someone on the politburo
 | 
				
			||||||
#[derive(Yokeable)]
 | 
					#[derive(Yokeable, Deserialize)]
 | 
				
			||||||
pub struct SituationCard<'a> {
 | 
					pub struct SituationCard<'a> {
 | 
				
			||||||
    /// Points associated with the card
 | 
					    /// Points associated with the card
 | 
				
			||||||
    points: i32,
 | 
					    points: i32,
 | 
				
			||||||
| 
						 | 
					@ -43,5 +44,8 @@ pub enum CardType {
 | 
				
			||||||
    Position(Position),
 | 
					    Position(Position),
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// ??
 | 
					#[derive(Deserialize)]
 | 
				
			||||||
pub enum Effect {}
 | 
					pub struct Effect {
 | 
				
			||||||
 | 
					    effect: char,
 | 
				
			||||||
 | 
					    magnitude: f32,
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,8 +11,8 @@ use libp2p::{
 | 
				
			||||||
use rand::Rng;
 | 
					use rand::Rng;
 | 
				
			||||||
use serde::{Deserialize, Serialize};
 | 
					use serde::{Deserialize, Serialize};
 | 
				
			||||||
use std::{borrow::Cow, hash::Hash};
 | 
					use std::{borrow::Cow, hash::Hash};
 | 
				
			||||||
use std::{cell::OnceCell, sync::OnceLock, time::Duration};
 | 
					 | 
				
			||||||
use std::{collections::hash_map::DefaultHasher, hash::Hasher};
 | 
					use std::{collections::hash_map::DefaultHasher, hash::Hasher};
 | 
				
			||||||
 | 
					use std::{sync::OnceLock, time::Duration};
 | 
				
			||||||
use yoke::{Yoke, Yokeable};
 | 
					use yoke::{Yoke, Yokeable};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(NetworkBehaviour)]
 | 
					#[derive(NetworkBehaviour)]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,10 @@
 | 
				
			||||||
 | 
					use serde::Deserialize;
 | 
				
			||||||
use yoke::Yoke;
 | 
					use yoke::Yoke;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use crate::cards::ActionCard;
 | 
					use crate::cards::ActionCard;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// The players position on the Politburo
 | 
					/// The players position on the Politburo
 | 
				
			||||||
 | 
					#[derive(Deserialize)]
 | 
				
			||||||
pub enum Position {
 | 
					pub enum Position {
 | 
				
			||||||
    /// Very direct, aggressive. Focuses on generating influence.
 | 
					    /// Very direct, aggressive. Focuses on generating influence.
 | 
				
			||||||
    /// Public opinion suffers as a result.
 | 
					    /// Public opinion suffers as a result.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue