Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Level code and updated interfaces to accomodate #14

Merged
merged 6 commits into from
Aug 24, 2016

Conversation

nullorvoid
Copy link
Contributor

@nullorvoid nullorvoid commented Aug 15, 2016

Description

Implemented the level and the creation of the elements that can go in the level. To do this I had to add a few properties defined in #10 such as Position and SetPosition. I am still not 100% sure that Position rather than Position2D is correct here, however to keep the interfaces generic it is required.

The level implementation has ILevel, ICreateAreas, ICreateTiles, ICreateEntities on it, and takes the creation factories in the constructor. I have left a default constructor so that this can be used as a base class. I think some of these functions could become virtual in that case, but for the moment I have left them as standard functions.

I did think about having the Add for the Level, Area, and Tile set the parent however I think this could be problematic though in some instances.

I have left the position and GetNeighbours to be implemented and I will add an issue to fix this in another PR

What Changed

  • Added Level
  • Updated Area, Tile, Entity, and Interfaces where required
  • Implemented Creation of things in Level
  • Tests

New Tests!

image

@nullorvoid nullorvoid added WIP and removed WIP labels Aug 15, 2016

// Location in the system
public ILevel Level { get; private set; }
public IPosition2D Position { get; private set; }
public IPosition Position
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, look better like that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only problem is where it's used you will have to cast, but to keep the internals clean it is actually better in my opinion, but when you put samples together we will really know.

@kefniark
Copy link
Contributor

kefniark commented Aug 24, 2016

Look really nice, All those test I want to play with
Should be mergeable soon, just a strange naming issue and some Assert.Fail(); without github issues

@nullorvoid
Copy link
Contributor Author

Updated I think this is ready for the green button now.

@kefniark kefniark merged commit 4db6df2 into Wizcorp:develop Aug 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants