473,396 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Need a 3x3 and a 4x4 grid code

This is what I have so far, my goal is to get this to display a randomly chosen 3x3 grid of words from Words.txt, which has 10 words, and then will swap one word of those out, note which one it is, then replace it, the grid will be wiped after 30 seconds.
This is what I have so far
Expand|Select|Wrap|Line Numbers
  1. Module Module1
  2.  
  3.  
  4.     Sub Main()
  5.         Dim Choice As Integer
  6.         Dim fileReader As System.IO.StreamReader
  7.         Dim stringreader As String
  8.         Console.ForegroundColor = ConsoleColor.Blue
  9.         Console.WriteLine("For easy mode, type 1, for hard mode type 2")
  10.         Console.WriteLine("Easy mode has a 3x3 grid of words, 4x4 for hard")
  11.         Choice = Console.ReadLine()
  12.  
  13.         Select Case Choice
  14.  
  15.             Case 1 'Easy Mode
  16.                 Console.WriteLine("Hardmode")
  17.                 fileReader =
  18.                 My.Computer.FileSystem.OpenTextFileReader("N:\Controlled Assessment One\WordsEdited.txt")
  19.                 stringreader = fileReader.ReadLine()
  20.                 Console.WriteLine("The first line of the file is " & stringreader)
  21.  
  22.                 Console.Clear() 'Adios, written things
  23.  
  24.                 'Calls up a modified file   fileReader =
  25.                 My.Computer.FileSystem.OpenTextFileReader("N:\Controlled Assessment One\WordsEdited2.txt")
  26.                 stringreader = fileReader.ReadLine()
  27.                 Console.WriteLine("The first line of the file is " & stringreader)
  28.  
  29.                 Console.ReadLine()
  30.             Case 2 'Hard mode
  31.                 Console.WriteLine("Easy Mode")
  32.                 fileReader =
  33.               My.Computer.FileSystem.OpenTextFileReader("N:\Controlled Assessment One\Words.txt")
  34.                 stringreader = fileReader.ReadLine()
  35.                 Console.WriteLine("The first line of the file is " & stringreader)
  36.  
  37.                 Console.Clear() 'Adios, written things.
  38.  
  39.  
  40.                 'Calls up a modified file
  41.                 fileReader =
  42.             My.Computer.FileSystem.OpenTextFileReader("N:\Controlled Assessment One\Words2.txt")
  43.                 stringreader = fileReader.ReadLine()
  44.                 Console.WriteLine("The first line of the file is " & stringreader)
  45.             Case Else
  46.                 Console.WriteLine("Incorrect Output")
  47.         End Select
  48.  
  49.  
  50.         Console.ReadLine()
  51.  
  52.  
  53.     End Sub
  54.  
  55.  
Oct 9 '15 #1
1 1212
Expand|Select|Wrap|Line Numbers
  1. While Not fileReader.EndOfStream
  2.             For x to 16
  3.  
  4.         End While
  5.  
Trying this
Oct 9 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ali | last post by:
I am in great need of code that will make a dome. I would like the inputs to be similar to that of the sphere. ie: pos=(x0, y0, z0) radius = R color = (r,g,b) etc. I am using VPython of...
1
by: Cibulya Dmitriy | last post by:
Hi All, I want to catch the next MSSQL error in my SQL code with following continue calculations Server: Msg 17, Level 16, State 1, Line 1 SQL Server does not exist or access denied.
34
by: Mark Kamoski | last post by:
Hi-- Please help. I need a code sample for bubble sort. Thank you. --Mark
2
by: Mark Kamoski | last post by:
Hi Everyone-- Please help. I need a code sample for merge sort. Thank you. --Mark
1
by: Riyadh Hossain | last post by:
I am developing USPS shipping API for my site. All the work is going on testing phase. My site uses PHP/MySQL. Now I am working on USPS tracking/confirm. I can send request and get responses from...
0
by: ravibrl | last post by:
Hey I need c++ code to access a webpage and download some software. If I execute that it should download that software and it should install it in my system. Give suggestions how to write that code...
3
by: dee vee bee | last post by:
this is my project i need a code that will show like this.. "first number __" "second number ___" "choose operation: addition..subtraction..multiplication..division" "the answer is ___" the...
1
by: saravanatmm | last post by:
I need javascript code for validate the email address. Email address field cannot allowed the capital letters, special characters except '@' symbol. But can allowed the small letters, numeric...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.