Regarding start nodes and first nodes for the new stage text file

4 views
Skip to first unread message

Nithin Uppalapati

unread,
Apr 18, 2014, 12:52:45 AM4/18/14
to cs...@googlegroups.com
Hi,

For DudeFighter.txt as we do not have '!' and '.' for start and end nodes, we can infer them based on the adjmatrix.

by processing adjmatrix 'Forest' can be inferred as start node as it has no incoming edges.

but how to decide which one is end node because we have three nodes which do not have outgoing edges:

'Exit'   , 'Victory' , '(checkpoint)  // for now do not consider checkpoint

but how to decide between Exit and Victory like which one is the end node.


Thanks,
Nithin

Robert Richmond

unread,
Apr 18, 2014, 10:22:19 AM4/18/14
to cs...@googlegroups.com
Just create a universal end node call it 'End thanks for playing!' and reroute all of the other "end nodes" to it. 


--
You received this message because you are subscribed to the Google Groups "cs310" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cs310+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Quinn Jones

unread,
Apr 18, 2014, 12:51:01 PM4/18/14
to cs...@googlegroups.com

Yeah, that's also what I'm (trying) doing, But yeah you basically make the one without incoming edges the start and any and all nodes without outgoing edges would go to the implicit exiting node.

--Quinn Jones
qjo...@mix.wvu.edu

Nithin Uppalapati

unread,
Apr 18, 2014, 1:22:43 PM4/18/14
to cs...@googlegroups.com
As robert said i am not sure if we can change the stagetext Dr. Menzies gave. 

May be we can derive start and end nodes based on adjMatrix. And for this stagetext we will have 1 start node: Forest and 2 exit nodes: Exit , Victory


--
Sent from Gmail Mobile

Quinn Jones

unread,
Apr 18, 2014, 1:29:51 PM4/18/14
to cs...@googlegroups.com

You don't have to change the text you can just create an extra node in the code that exits and then if you find a node with no written outgoing edges you instead attach it to the exit node.

--Quinn Jones
qjo...@mix.wvu.edu

Cheyenne Parsley

unread,
Apr 18, 2014, 6:14:46 PM4/18/14
to cs...@googlegroups.com
There are many ways to handle this. I would prefer you to not alter the StageText. Quinn has a good idea. 
You could also handle a node called 'Exit' differently (i.e. do a match, don't add it to the matrix, etc.). 

Try some of these ideas out.
Cheyenne Parsley
LSCEE Teaching Assistant, Researcher
Statler College of Engineering, WVU
757 Engineering Sciences Building

Reply all
Reply to author
Forward
0 new messages