Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Need help  (Read 1533 times)

0 Members and 1 Guest are viewing this topic.

Joshua Booker

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Need help
« on: August 25, 2016, 11:36:32 pm »
Hello,

I am working on a connect the dots game to learn basics of game design, but I am struggling to figure out how to check if lines are drawn in between  two circles which are used as dots. Does anyone know how to do this?


man'O'war

  • Newbie
  • *
  • Posts: 46
  • What needs to be done is done by those capable.
    • View Profile
Re: Need help
« Reply #1 on: August 26, 2016, 12:09:35 am »
Hi,

You can use a matrix to represent links between your dots.

Check this out. (Adjacency matrix ) It is one of many ways of representing links for a graph.
https://en.wikipedia.org/wiki/Adjacency_matrix#Examples

In fact, the implementation of your problem is based on a graph structure.
Where, Circles/dots are nodes and lines are Links.

I suggest you read some tutorial about that, it will make it very easy to implement your game.

Goodluck