Spielfeld/Spielfeld/TBewegung.cs
2015-11-15 23:31:59 +00:00

41 lines
963 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
namespace Spielfeld
{
class TBewegung
{
//Form1 form = new Form1();
//Richtung
public char richtung;
private Form1 form;
public TBewegung(Form1 form)
{
// TODO: Complete member initialization
this.form = form;
}
public Location aussuchen(Location pos)
{
switch (richtung)
{
case 'a': pos.X -= 10; break;
case 'd': pos.X += 10; break;
case 'w': pos.Y -= 10; break;
case 's': pos.Y += 10; break;
default: break;
}
return pos;
}
public void bewegen()
{
this.spieler1.addLocation(this.aussuchen(this.spieler1.getLocation()));
}
}
}