1 # Copyright (c) 2009 Paolo Capriotti <p.capriotti@gmail.com>
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
13 result = Point.new((p.x.to_f / unit.x).floor,
14 (p.y.to_f / unit.y).floor)
15 result = flip_point(result) if flipped?
20 p = flip_point(p) if flipped?
21 Qt::PointF.new(p.x * unit.x, p.y * unit.y)
25 Point.new(@game.size.x - p.x - 1, @game.size.y - p.y - 1)