Module bwapi::position[][src]

Examples

extern crate bwapi;
use bwapi::position::*;

let pos = Position::new(640, 480);

let mulpl = &pos * 2;
assert!(mulpl.x() == 640 * 2);
assert!(mulpl.y() == 480 * 2);
extern crate bwapi;
extern crate bwapi_sys;

use bwapi::position::*;

let pos = Position::new(640, 480);
let walk_pos = WalkPosition::from(pos);
// or #![feature(type_ascription)]
//    let walk_pos = pos.into() : WalkPosition;
let sys_walk_pos: bwapi_sys::WalkPosition = walk_pos.into();

Structs

Position

Indicates a position that is 1×1 pixel in size. This is the most precise position type.

TilePosition

Indicates a position that is 32×32 pixels in size.

WalkPosition

Indicates a position that is 8×8 pixels in size.

Traits

Point