User:Pluke/structues

From Wikibooks, open books for an open world
Jump to: navigation, search
<img href="myimage.jpg" />
<a href="http://myschool.eg">link to my page</a>


<html>
<head>
    <title>My first webpage</title>
</head>
<body>
    Hello world!
</body>
</html>


Module Module1

    Enum character
        WARLOCK
        'finish this ENUM
    End Enum


    Structure enemy
        Dim name As String
        Dim health As Integer
        Dim charclass As character
    End Structure


    Sub Main()
        Dim orc1 As enemy
        Dim orc2 As enemy

        orc1.name = "Barry"
        orc1.health = 120
        orc1.charclass = '??

        'create orc2

        'create a dragon

        'add speed to the enemy

        'create another structure to store a hero, what attributes will it have?

        'make two heroes

    End Sub

End Module


Module Module1

    Enum character
        WARLOCK
        'finish this ENUM
    End Enum


    Structure enemy
        Dim name As String
        Dim health As Integer
        Dim charclass As character
    End Structure


    Sub Main()
        Dim orc1 As enemy
        Dim orc2 As enemy

        orc1.name = "Barry"
        orc1.health = 120
        orc1.charclass = '??

        'create orc2

        'create a dragon

        'add speed to the enemy

        'create another structure to store a hero, what attributes will it have?

        'make two heroes

        ' create a sub: statusE (c) which will show the stats for the enemy c

        ' create a sub: statusH (c) which will show the stats for the hero c

        ' create a function: attack (h, e) which will deduct 50 health points from the enemy

        ' if an attack kills an enemy, then display "[ENEMYNAME] is dead"

        ' get the hero to kill orc1, use statusE to show that the orc1 is dead and orc2 is alive

        ' create a barbarian horde using an array, create a loop to display their health

        ' create a sub to easily create a NewEnemy, for example:
        '             NewEnemy(john, “John”, 100, 0)
    End Sub

End Module