nil-core 0.5.5

Multiplayer strategy game
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (C) Call of Nil contributors
// SPDX-License-Identifier: AGPL-3.0-only

mod bot;
mod precursor;

use crate::error::Result;
use crate::ethic::Ethics;
use crate::ruler::Ruler;
use crate::world::World;
use tap::Pipe;

impl World {
  pub(crate) fn get_ethics(&self, ruler: &Ruler) -> Result<Option<Ethics>> {
    self.ruler(ruler)?.ethics().cloned().pipe(Ok)
  }
}