home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2002 May / Game.EXE_05_2002.iso / Alawar / src / Position.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2002-04-01  |  269 b   |  21 lines

  1. #include "Position.h"
  2.  
  3. bool Position::go_to(float length)
  4. {
  5.     koef += length;
  6.     if ( koef > 1 )
  7.     {
  8.         koef = 1;
  9.         return true;
  10.     }
  11.     return false;
  12. }
  13.  
  14. void Position::swap_dst()
  15. {
  16.     Coord temp_coord = src;
  17.     src = dst;
  18.     dst = temp_coord;
  19.     koef = 1 - koef;
  20. }
  21.