7 lines
250 B
Plaintext
7 lines
250 B
Plaintext
function c_moveunit(targetunit, destination) {
|
|
array_remove(c_gettile(targetunit.pos.x, targetunit.pos.y).contents, targetunit);
|
|
array_push(destination.contents, targetunit);
|
|
targetunit.pos.x = destination.x;
|
|
targetunit.pos.y = destination.y;
|
|
|
|
} |