refact: add cargo "python" feature for pyo3
This commit is contained in:
parent
f15c5fb9dd
commit
46416cdaef
7 changed files with 12 additions and 6 deletions
|
|
@ -1,3 +1,4 @@
|
|||
#[cfg(feature = "python")]
|
||||
use pyo3::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt;
|
||||
|
|
@ -5,7 +6,7 @@ use std::fmt;
|
|||
// This just makes it easier to dissern between a player id and any ol' u64
|
||||
pub type PlayerId = u64;
|
||||
|
||||
#[pyclass(eq, eq_int)]
|
||||
#[cfg_attr(feature = "python", pyclass(eq, eq_int))]
|
||||
#[derive(Copy, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub enum Color {
|
||||
White,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue