reee
This commit is contained in:
		
							parent
							
								
									6d1d97ed9d
								
							
						
					
					
						commit
						b1fc8a4e60
					
				
							
								
								
									
										35
									
								
								types2.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								types2.rs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,35 @@
 | 
			
		||||
struct Game {
 | 
			
		||||
	name: String,
 | 
			
		||||
	players: vec<Player>,
 | 
			
		||||
	max_players: <u16>
 | 
			
		||||
	stars: vec<Star>,
 | 
			
		||||
	settings: Settings
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
struct Player {
 | 
			
		||||
	name: String,
 | 
			
		||||
	color: (u8, u8, u8),
 | 
			
		||||
	tech: vec<(Tech)>,
 | 
			
		||||
	research_queue: vec<String>,
 | 
			
		||||
	money: u16
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
trait On_Cycle {
 | 
			
		||||
	fn active(&self) {};
 | 
			
		||||
} 
 | 
			
		||||
 | 
			
		||||
struct Tech {
 | 
			
		||||
	name: str,
 | 
			
		||||
	description: str,
 | 
			
		||||
	points: u32
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl On_Cycle for Tech {
 | 
			
		||||
	pub fn active(&self, game: &Game) {
 | 
			
		||||
		if game.settings.mode = "vanilla" {
 | 
			
		||||
			match self.name {
 | 
			
		||||
				"Experimentation" => experimentation(game.players[???])
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	};
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user