SlideShare a Scribd company logo
1 of 1
Download to read offline
So I have 3 enums named land_type, entity, tile as shown:
enum land_type {
GRASS,
WATER,
PATH_START,
PATH_END,
PATH_UP,
PATH_RIGHT,
PATH_DOWN,
PATH_LEFT,
TELEPORTER
};
enum entity {
EMPTY,
ENEMY,
BASIC_TOWER,
POWER_TOWER,
FORTIFIED_TOWER,
};
and I have created a struct named:
struct tile {
enum land_type land;
enum entity entity;
int n_enemies;
}; // which consists of all the enums.
I have also created something called map[SP1][SP2], SP1 = Row component of starting point
and SP2 is column component of starting point. both of type ints. Similarly, map[EP1][EP2] is
the end points. How do I assign these Starting points and end points into the enum
PATH_START and PATH_END respectively?

More Related Content

More from leolight2

Seventy-three percent of adults in a certain country believe that li.pdf
Seventy-three percent of adults in a certain country believe that li.pdfSeventy-three percent of adults in a certain country believe that li.pdf
Seventy-three percent of adults in a certain country believe that li.pdfleolight2
 
Sheffield Corporation, a private corporation, was organized on Febru.pdf
Sheffield Corporation, a private corporation, was organized on Febru.pdfSheffield Corporation, a private corporation, was organized on Febru.pdf
Sheffield Corporation, a private corporation, was organized on Febru.pdfleolight2
 
SHOW ANSWER ON GRAPH Many demographers predict that the United State.pdf
SHOW ANSWER ON GRAPH Many demographers predict that the United State.pdfSHOW ANSWER ON GRAPH Many demographers predict that the United State.pdf
SHOW ANSWER ON GRAPH Many demographers predict that the United State.pdfleolight2
 
Ser capaz de amplificar fragmentos de ADN espec�ficos es fundamental.pdf
Ser capaz de amplificar fragmentos de ADN espec�ficos es fundamental.pdfSer capaz de amplificar fragmentos de ADN espec�ficos es fundamental.pdf
Ser capaz de amplificar fragmentos de ADN espec�ficos es fundamental.pdfleolight2
 
Solve all of them If the marginal propensity to save is 0.25 , then.pdf
Solve all of them  If the marginal propensity to save is 0.25 , then.pdfSolve all of them  If the marginal propensity to save is 0.25 , then.pdf
Solve all of them If the marginal propensity to save is 0.25 , then.pdfleolight2
 
Solution Register a service endpoint in the Dataverse instance that.pdf
Solution Register a service endpoint in the Dataverse instance that.pdfSolution Register a service endpoint in the Dataverse instance that.pdf
Solution Register a service endpoint in the Dataverse instance that.pdfleolight2
 
Solutions for The Toliza Museum of Art, did not cover all the answer.pdf
Solutions for The Toliza Museum of Art, did not cover all the answer.pdfSolutions for The Toliza Museum of Art, did not cover all the answer.pdf
Solutions for The Toliza Museum of Art, did not cover all the answer.pdfleolight2
 
Soles es una empresa de calzado que ha abierto recientemente su tien.pdf
Soles es una empresa de calzado que ha abierto recientemente su tien.pdfSoles es una empresa de calzado que ha abierto recientemente su tien.pdf
Soles es una empresa de calzado que ha abierto recientemente su tien.pdfleolight2
 
So for C-ferns the CP is the commonwild type (green) and the cp is .pdf
So for C-ferns the CP is the commonwild type (green) and the cp is .pdfSo for C-ferns the CP is the commonwild type (green) and the cp is .pdf
So for C-ferns the CP is the commonwild type (green) and the cp is .pdfleolight2
 
So I need to create a compound word game, and I dont quite understa.pdf
So I need to create a compound word game, and I dont quite understa.pdfSo I need to create a compound word game, and I dont quite understa.pdf
So I need to create a compound word game, and I dont quite understa.pdfleolight2
 
SLL Corporation�s balance sheet is shown below. The current rate on .pdf
SLL Corporation�s balance sheet is shown below. The current rate on .pdfSLL Corporation�s balance sheet is shown below. The current rate on .pdf
SLL Corporation�s balance sheet is shown below. The current rate on .pdfleolight2
 
So here is the code from the previous assignment that we need to ext.pdf
So here is the code from the previous assignment that we need to ext.pdfSo here is the code from the previous assignment that we need to ext.pdf
So here is the code from the previous assignment that we need to ext.pdfleolight2
 
Solaris, Inc. tiene 2000 acciones del 5 , valor nominal de $10, acc.pdf
Solaris, Inc. tiene 2000 acciones del 5 , valor nominal de $10, acc.pdfSolaris, Inc. tiene 2000 acciones del 5 , valor nominal de $10, acc.pdf
Solaris, Inc. tiene 2000 acciones del 5 , valor nominal de $10, acc.pdfleolight2
 
Slapshot Company makes ice hockey sticks. During the month of June, .pdf
Slapshot Company makes ice hockey sticks. During the month of June, .pdfSlapshot Company makes ice hockey sticks. During the month of June, .pdf
Slapshot Company makes ice hockey sticks. During the month of June, .pdfleolight2
 
SGI versus Dell competencia en servidores y computaci�n en la nube.pdf
SGI versus Dell competencia en servidores y computaci�n en la nube.pdfSGI versus Dell competencia en servidores y computaci�n en la nube.pdf
SGI versus Dell competencia en servidores y computaci�n en la nube.pdfleolight2
 
Si escuchara que la diversidad cultural est� desapareciendo en una d.pdf
Si escuchara que la diversidad cultural est� desapareciendo en una d.pdfSi escuchara que la diversidad cultural est� desapareciendo en una d.pdf
Si escuchara que la diversidad cultural est� desapareciendo en una d.pdfleolight2
 
Since March 2020, the world has undergone a major health and financi.pdf
Since March 2020, the world has undergone a major health and financi.pdfSince March 2020, the world has undergone a major health and financi.pdf
Since March 2020, the world has undergone a major health and financi.pdfleolight2
 
Simulation of traffic queues in a junction with lightsIt has been .pdf
Simulation of traffic queues in a junction with lightsIt has been .pdfSimulation of traffic queues in a junction with lightsIt has been .pdf
Simulation of traffic queues in a junction with lightsIt has been .pdfleolight2
 
Significant Cybersecurity Attack on Critical Infrastructure [Your s.pdf
Significant Cybersecurity Attack on Critical Infrastructure [Your s.pdfSignificant Cybersecurity Attack on Critical Infrastructure [Your s.pdf
Significant Cybersecurity Attack on Critical Infrastructure [Your s.pdfleolight2
 
Signals and Systems class 6. (20 Points) Which of following impulse .pdf
Signals and Systems class 6. (20 Points) Which of following impulse .pdfSignals and Systems class 6. (20 Points) Which of following impulse .pdf
Signals and Systems class 6. (20 Points) Which of following impulse .pdfleolight2
 

More from leolight2 (20)

Seventy-three percent of adults in a certain country believe that li.pdf
Seventy-three percent of adults in a certain country believe that li.pdfSeventy-three percent of adults in a certain country believe that li.pdf
Seventy-three percent of adults in a certain country believe that li.pdf
 
Sheffield Corporation, a private corporation, was organized on Febru.pdf
Sheffield Corporation, a private corporation, was organized on Febru.pdfSheffield Corporation, a private corporation, was organized on Febru.pdf
Sheffield Corporation, a private corporation, was organized on Febru.pdf
 
SHOW ANSWER ON GRAPH Many demographers predict that the United State.pdf
SHOW ANSWER ON GRAPH Many demographers predict that the United State.pdfSHOW ANSWER ON GRAPH Many demographers predict that the United State.pdf
SHOW ANSWER ON GRAPH Many demographers predict that the United State.pdf
 
Ser capaz de amplificar fragmentos de ADN espec�ficos es fundamental.pdf
Ser capaz de amplificar fragmentos de ADN espec�ficos es fundamental.pdfSer capaz de amplificar fragmentos de ADN espec�ficos es fundamental.pdf
Ser capaz de amplificar fragmentos de ADN espec�ficos es fundamental.pdf
 
Solve all of them If the marginal propensity to save is 0.25 , then.pdf
Solve all of them  If the marginal propensity to save is 0.25 , then.pdfSolve all of them  If the marginal propensity to save is 0.25 , then.pdf
Solve all of them If the marginal propensity to save is 0.25 , then.pdf
 
Solution Register a service endpoint in the Dataverse instance that.pdf
Solution Register a service endpoint in the Dataverse instance that.pdfSolution Register a service endpoint in the Dataverse instance that.pdf
Solution Register a service endpoint in the Dataverse instance that.pdf
 
Solutions for The Toliza Museum of Art, did not cover all the answer.pdf
Solutions for The Toliza Museum of Art, did not cover all the answer.pdfSolutions for The Toliza Museum of Art, did not cover all the answer.pdf
Solutions for The Toliza Museum of Art, did not cover all the answer.pdf
 
Soles es una empresa de calzado que ha abierto recientemente su tien.pdf
Soles es una empresa de calzado que ha abierto recientemente su tien.pdfSoles es una empresa de calzado que ha abierto recientemente su tien.pdf
Soles es una empresa de calzado que ha abierto recientemente su tien.pdf
 
So for C-ferns the CP is the commonwild type (green) and the cp is .pdf
So for C-ferns the CP is the commonwild type (green) and the cp is .pdfSo for C-ferns the CP is the commonwild type (green) and the cp is .pdf
So for C-ferns the CP is the commonwild type (green) and the cp is .pdf
 
So I need to create a compound word game, and I dont quite understa.pdf
So I need to create a compound word game, and I dont quite understa.pdfSo I need to create a compound word game, and I dont quite understa.pdf
So I need to create a compound word game, and I dont quite understa.pdf
 
SLL Corporation�s balance sheet is shown below. The current rate on .pdf
SLL Corporation�s balance sheet is shown below. The current rate on .pdfSLL Corporation�s balance sheet is shown below. The current rate on .pdf
SLL Corporation�s balance sheet is shown below. The current rate on .pdf
 
So here is the code from the previous assignment that we need to ext.pdf
So here is the code from the previous assignment that we need to ext.pdfSo here is the code from the previous assignment that we need to ext.pdf
So here is the code from the previous assignment that we need to ext.pdf
 
Solaris, Inc. tiene 2000 acciones del 5 , valor nominal de $10, acc.pdf
Solaris, Inc. tiene 2000 acciones del 5 , valor nominal de $10, acc.pdfSolaris, Inc. tiene 2000 acciones del 5 , valor nominal de $10, acc.pdf
Solaris, Inc. tiene 2000 acciones del 5 , valor nominal de $10, acc.pdf
 
Slapshot Company makes ice hockey sticks. During the month of June, .pdf
Slapshot Company makes ice hockey sticks. During the month of June, .pdfSlapshot Company makes ice hockey sticks. During the month of June, .pdf
Slapshot Company makes ice hockey sticks. During the month of June, .pdf
 
SGI versus Dell competencia en servidores y computaci�n en la nube.pdf
SGI versus Dell competencia en servidores y computaci�n en la nube.pdfSGI versus Dell competencia en servidores y computaci�n en la nube.pdf
SGI versus Dell competencia en servidores y computaci�n en la nube.pdf
 
Si escuchara que la diversidad cultural est� desapareciendo en una d.pdf
Si escuchara que la diversidad cultural est� desapareciendo en una d.pdfSi escuchara que la diversidad cultural est� desapareciendo en una d.pdf
Si escuchara que la diversidad cultural est� desapareciendo en una d.pdf
 
Since March 2020, the world has undergone a major health and financi.pdf
Since March 2020, the world has undergone a major health and financi.pdfSince March 2020, the world has undergone a major health and financi.pdf
Since March 2020, the world has undergone a major health and financi.pdf
 
Simulation of traffic queues in a junction with lightsIt has been .pdf
Simulation of traffic queues in a junction with lightsIt has been .pdfSimulation of traffic queues in a junction with lightsIt has been .pdf
Simulation of traffic queues in a junction with lightsIt has been .pdf
 
Significant Cybersecurity Attack on Critical Infrastructure [Your s.pdf
Significant Cybersecurity Attack on Critical Infrastructure [Your s.pdfSignificant Cybersecurity Attack on Critical Infrastructure [Your s.pdf
Significant Cybersecurity Attack on Critical Infrastructure [Your s.pdf
 
Signals and Systems class 6. (20 Points) Which of following impulse .pdf
Signals and Systems class 6. (20 Points) Which of following impulse .pdfSignals and Systems class 6. (20 Points) Which of following impulse .pdf
Signals and Systems class 6. (20 Points) Which of following impulse .pdf
 

Recently uploaded

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 

Recently uploaded (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

Assign starting and end points to enums in tile struct map

  • 1. So I have 3 enums named land_type, entity, tile as shown: enum land_type { GRASS, WATER, PATH_START, PATH_END, PATH_UP, PATH_RIGHT, PATH_DOWN, PATH_LEFT, TELEPORTER }; enum entity { EMPTY, ENEMY, BASIC_TOWER, POWER_TOWER, FORTIFIED_TOWER, }; and I have created a struct named: struct tile { enum land_type land; enum entity entity; int n_enemies; }; // which consists of all the enums. I have also created something called map[SP1][SP2], SP1 = Row component of starting point and SP2 is column component of starting point. both of type ints. Similarly, map[EP1][EP2] is the end points. How do I assign these Starting points and end points into the enum PATH_START and PATH_END respectively?