示例#1
0
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>
 """

from Grid import *
from GridField import *
import random

g = Grid(400, 300, 4, 5, True)
g.draw()

g.setfield(GridField(0, 0, True))
g.setfield(GridField(1, 1, True))
g.setfield(GridField(2, 2, True))
g.setfield(GridField(3, 3, True))
g.setfield(GridField(2, 4, True))

g.setfield(GridField(1, 1, False))



mainloop()