Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Chess board(Chess board)
Chess board [message #1760377] Wed, 26 April 2017 13:51 Go to next message
Antonio Garmendia is currently offline Antonio GarmendiaFriend
Messages: 93
Registered: May 2014
Member
Hi,

I'm trying to develop a graphical representation for a chess game. The idea is to build the board using 'Square' as a container for the pieces and used bordered nodes to join the squares. Right now, I'm facing that I cannot reuse the class 'Square' (Container) as a bordered node. In this manner, I would like to know if exist any way of doing this? or maybe exist other way to do it. Any hint would be appreciated.

Cheers,
Anthony

Re: Chess board [message #1760380 is a reply to message #1760377] Wed, 26 April 2017 14:18 Go to previous messageGo to next message
Etienne Juliot is currently offline Etienne JuliotFriend
Messages: 20
Registered: July 2009
Junior Member
I did for fun a Connect Four game with Sirius. So, I had also to deal with a Grid.
Do you want I share this with you to github ?
Re: Chess board [message #1760392 is a reply to message #1760380] Wed, 26 April 2017 15:11 Go to previous messageGo to next message
Antonio Garmendia is currently offline Antonio GarmendiaFriend
Messages: 93
Registered: May 2014
Member
Hi Etienne,

That would be very good, I am very interested. Would you share the link?

Cheers,
Anthony
Re: Chess board [message #1760442 is a reply to message #1760392] Thu, 27 April 2017 09:36 Go to previous messageGo to next message
Jerome Pequery is currently offline Jerome PequeryFriend
Messages: 2
Registered: July 2009
Junior Member
Hi,

I just try to set up a chess board using sirius, as an exercice. I used container region, horizontal and vertical, to set up the chess board on a diagram, and then a Style customization to set pieces black or white. Just for clarification, there is an underlying EMF model, with a chessBoard containg 8 lines, each line containing 8 Cells.

Hope this information can help you

http://i.imgur.com/xaP4XAP.png

Re: Chess board [message #1760462 is a reply to message #1760442] Thu, 27 April 2017 14:03 Go to previous messageGo to next message
Antonio Garmendia is currently offline Antonio GarmendiaFriend
Messages: 93
Registered: May 2014
Member
Hi Jerome,

Thanks for your example, has been very useful and in fact I have been trying to reproduce it. It seems to me that the cells are not joined together. The cells are contained on the Line, but they may be scattered inside the Line, am I right?
I think that it would be very nice if in the diagram you can join the cells using, for example: Bordered Nodes. I have not seen in the odesign any clue of how you can define an element as a bordered node and at the same time be a container of elements. Did you know any way to do this?

Cheers,
Anthony
Re: Chess board [message #1760546 is a reply to message #1760462] Fri, 28 April 2017 08:25 Go to previous messageGo to next message
Etienne Juliot is currently offline Etienne JuliotFriend
Messages: 20
Registered: July 2009
Junior Member
Hi,

Here is my code: https://github.com/ejuliot/PlayWithSirius
I used vertical and horizontal stacks to represent cells. And I used SVG image to improve the look and feel.

https://raw.githubusercontent.com/ejuliot/PlayWithSirius/master/documentation/images/connectfour.png
Re: Chess board [message #1760744 is a reply to message #1760546] Tue, 02 May 2017 14:45 Go to previous message
Antonio Garmendia is currently offline Antonio GarmendiaFriend
Messages: 93
Registered: May 2014
Member
Hi Etienne,

Thanks for your time and for sharing the code. I can use this example to make the chess board.

Cheers,
Anthony
Previous Topic:sirius, eclipse4, gef4
Next Topic:Cross table add line
Goto Forum:
  


Current Time: Thu Apr 25 01:20:18 GMT 2024

Powered by FUDForum. Page generated in 0.03043 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top