<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: spookywookie73</title>
    <description>The latest articles on DEV Community by spookywookie73 (@spookywookie73).</description>
    <link>https://dev.to/spookywookie73</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1201166%2F15f1fc5b-007c-4076-b215-15c151fa2b6e.png</url>
      <title>DEV Community: spookywookie73</title>
      <link>https://dev.to/spookywookie73</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/spookywookie73"/>
    <language>en</language>
    <item>
      <title>Codecademy: Recommendation Program Project</title>
      <dc:creator>spookywookie73</dc:creator>
      <pubDate>Thu, 08 Feb 2024 14:03:35 +0000</pubDate>
      <link>https://dev.to/spookywookie73/codecademy-recommendation-program-project-1535</link>
      <guid>https://dev.to/spookywookie73/codecademy-recommendation-program-project-1535</guid>
      <description>&lt;h2&gt;
  
  
  The 'why'
&lt;/h2&gt;

&lt;p&gt;The next project in the Codecademy Computer Science course is to create a basic recommendation program to run in your terminal.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Program
&lt;/h2&gt;

&lt;p&gt;When you run the code, you can find the code on my github page &lt;a href="https://github.com/spookywookie73/recommendation_program.git"&gt;here,&lt;/a&gt;&lt;br&gt;
 you will see a welcome screen, and will be given a list of companies to choose from.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Project Objectives
&lt;/h2&gt;

&lt;p&gt;Store data in a data structure:&lt;br&gt;
&lt;code&gt;def create_company_linkedlist():&lt;br&gt;
  company_list = LinkedList()&lt;br&gt;
  for company_name in consoles:&lt;br&gt;
    company_list.insert_beginning(company_name)&lt;br&gt;
  return company_list&lt;/code&gt;&lt;br&gt;
and use an algorithm to sort or search for data within a data structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def display_games():
  print("\nSelected company: " + company_choice.title() + "\n")
  console_list_head = consoles_list.get_head_node()

  while console_list_head.get_next_node() is not None:
    sublist_head = console_list_head.get_value().get_head_node()

    if sublist_head.get_value()[0] == company_choice:
      while sublist_head.get_next_node() is not None:
        print("Console name: " + sublist_head.get_value()[1])
        print("Game name: " + sublist_head.get_value()[2])
        print("Genre: " + sublist_head.get_value()[3])
        print("\n")
        sublist_head = sublist_head.get_next_node()
    console_list_head = console_list_head.get_next_node()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;It was a simple enough project in the end, but, yet again it took longer than it should have, because I kept adding more and more to it. Once I stripped it down to just do what was asked, it worked perfectly.&lt;/p&gt;

&lt;p&gt;Thankyou for reading.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Codecademy CS101 Final Project: Old School Text Adventure.</title>
      <dc:creator>spookywookie73</dc:creator>
      <pubDate>Thu, 09 Nov 2023 12:28:41 +0000</pubDate>
      <link>https://dev.to/spookywookie73/codecademy-cs101-final-project-old-school-text-adventure-15bm</link>
      <guid>https://dev.to/spookywookie73/codecademy-cs101-final-project-old-school-text-adventure-15bm</guid>
      <description>&lt;h2&gt;
  
  
  The 'why'
&lt;/h2&gt;

&lt;p&gt;As part of Codecademy's Computer Science course, the final project of the Python section wanted you to create a program to run in your terminal.&lt;br&gt;
Your program could be a game, a calculator, a magic 8 ball etc..&lt;br&gt;
I decided to expand on a previous project and create an old school text adventure. These were some of the first games I played on a computer and I loved them.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Game
&lt;/h2&gt;

&lt;p&gt;As you can see in the gif above, the program starts with a basic introduction. You are given some of the commands to play the game and then are asked for your name. The game starts with a wizard explaining what he wants you to do, and if you agree, your adventure begins.&lt;/p&gt;

&lt;p&gt;During the game there will be items to find, objects and people to interact with and monsters to fight.&lt;/p&gt;

&lt;p&gt;If you want to try it, you can find the code on my github page &lt;a href="https://github.com/spookywookie73/old-school-text-adventure.git"&gt;here.&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The code
&lt;/h2&gt;

&lt;p&gt;Your program had to contain at least 1 input command and a combination of classes and functions.&lt;/p&gt;

&lt;p&gt;The input command looked like this:&lt;br&gt;
&lt;code&gt;heroes_name = input("\nPlease input your name and press enter to begin. : ")&lt;/code&gt;&lt;br&gt;
I created two classes. One for the hero and one for the monsters.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Adventurer:

  def __init__(self, name, health = 30, gems = 0, inventory = ["sword"]):
    self.name = name
    self.health = health
    self.gems = gems
    self.inventory = inventory

  def __repr__(self):
    return "The name of this adventurer is {name}. {name}, with sword in hand, has bravely accepted the challenge to rid this dungeon of it's evil.".format(name = self.name)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Monster:

  def __init__(self, name, health):
    self.name = name
    self.health = health

  def __repr__(self):
    return "This is a {name}. It is a foul creature that has dwelled in this dungeon for far too long. It's health is {health}.".format(name = self.name, health = self.health)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The functions inside the classes were for using items and attacking enemies.&lt;/p&gt;

&lt;p&gt;The functions outside of the classes were for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;getting items&lt;/li&gt;
&lt;li&gt;examining objects&lt;/li&gt;
&lt;li&gt;giving items
etc..&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I really enjoyed this project. It took alot longer than I thought it would, probably because I kept rewriting parts of the game, but I am really pleased with the end result.&lt;br&gt;
I know there are probably alot of parts that could be thinned out to make the code cleaner, but I am not at that level yet.&lt;/p&gt;

&lt;p&gt;Thankyou for reading and happy coding.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
