instruction
stringlengths
71
71.9k
For legacy reason (guys here LOVE immutable object), I need a struct that contain an IpV4. I can't use System.Net.IPAddress because it's not a struct. So far here what I got: public struct IpV4Address { readonly byte[] address; public IpV4Address(byte[] address) { Throw.IfArgumentIsNull("address", ...
I have a large application that focuses on using dependency injection. I've made a small (as I possibly could) piece of sample code to make this question more manageable. Essentially, I have a lot of boiler-plate code occurring for a number of commands that call stored procedures and return a response object back to th...
This is an implementation of the minion game, which takes in string input and declares a winner between two pre-determined players. The logic is player 1 gets all sequenced words not starting with a vowel and player 2 gets all sequenced words starting with vowel in the input string. Objective: performance optimisation....
I have a Java class which has to be generated only once for all the objects that I have - it is a small program. This singleton class holds a mapping of characters. I Googled stack overflow and found that using enum is the most safest way to create a singleton class as Josh Bloch explained in his Java book. I also re...
I would like your opinion on my shell script that prints the Fibonacci sequence. #!/bin/bash first=0 second=1 third=1 echo -n "Term: " read term fub=$((second+third)) echo $second echo $third echo $fub for ((i=1; i<term; i++)) do third=$((fub+third)) echo $third fub=$((third+fub)) echo $fub done I tried to ...
I created two dropdowns, a dadand a son that are populated based on two arrays that, hypothetically, can't be changed. When you choose a dad with the code x it generates the son's drop-down with the options containing the code x. var dadArray = [ [1, 'Dad1'], [2, 'Dad2'], [3, 'Dad3'] ]; var sonArray = [ [1, ...
I have the following code and I'm trying to find a cleaner way to run the year functions. At the moment I have 5 years as divs with an onclick event to bring the appropriate year image into view. So if you click on 1950, the 1950 year image will appear. If you then click on 1960, the 1950 image will disappear and the 1...
I am implementing the algorithms of Course: Coursera Algorithm I. I implemented the Merge-Sort using recursion and although it sorts correctly I am not sure if it is a correct implementation of this algorithm. Could you guys take a look? How can I keep it more "readable"? ## # Implemetation of Merge Sort see: {https://...
I've implemented a two-step convolution in OpenCL running on GPUs. The convolution is applied to a series of 1480x1552 matrices. All matrices are pre-loaded and are stored in the input_image array. With my current implementation I'm able to achieve a processing rate of ~80 images per second. How, if possible, can I imp...
I have pasted a method I wrote, which is too slow to my liking (easily takes 60+ seconds to execute). The method loops through 12 different servers, checks if userX has access to any of the databases in this server and reports the result. I'm already using a table to save all of this information. That information is al...
In React, the render method must have one and exactly one child (although that child may have many more children). As a result, it becomes difficult to render elements that intrinsically need multiple elements as children without wrapping them in an unsemantic - and in the case of <dl>, forbidden - <div> element. As I ...
Although I've been programming a fair while I'm learning Python and would like to know how I can make my code more "Pythonic". I'm have a CSV file of eBay categories, containing the name and numeric code which I want to import in to my database. Unfortunately the file does not include a 'parent' category ID for each ro...
I've recently redone something I wrote around a year ago since I'd done it wrong (it required the original image to decode an imagine, which can be avoided), so I'm wondering if I could either get feedback on the style of writing, or on which bits can be broken, since I've tried to make it fairly robust. The idea is to...
The locks of the doors present in the maze are of 7 types: A, B, C, D, E, F and G. There are also some copies of keys around the maze, which can be of types a, b, c, d, e, f or g. A key of type a opens a door of type A, a key of type b opens a door of type B etc. Once a door is opened with a key, the door remains opene...
I've made a Sudoku generator. It works but it's clearly not very efficient. I'm looking for ways to optimize and speed it up a bit. You can check it out in this fiddle. The results are printed to the JS console with how many iterations it takes to find a working puzzle and the Sudoku array printed to console.table(). W...
For an assignment, I am told to write two methods: incrementDay() and incrementMonth(): incrementDay() This method takes no input and returns nothing. If the previous month's balance was not paid in full, the credit card charges interest on the current balance after each day. To do this, the class will need two ...
As I'm new to Redis, I would like to get a review / improvement suggestions from Redis / Lua experts on the following problem and the solution I have found so far. Problem The context is: an e-commerce system used by multiple users purchasing various items at different prices. Because of regulation, user purchases must...
I'm following this presentation. At the very end there's an exercise about solving Fibonacci and says that instead of addition, make the operation setteable by a function. Is the following is a good solution? How close might it be to what Rob Pike would have written? package main import "fmt" func add(a, b int) int {...
I've been learning Java for 4 weeks now twice a week and I wanted to test myself to see what I could do. I'd love to see what you think and how I can make it better. public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); char a1 = ' '; char a2 = ' '; char a3 = ' '; char...
My goal is to create a URL query params from std::map<std::string, std::string>. For example, we call to_query_params( {{"one","1"},{"two","2"}} ) and we get ?one=1&two=2. Is this a good way of doing it? std::string to_query_params(std::map<std::string, std::string> map) { if (map.empty()){ return ""; }...
I'm using an HTML editor to insert code into a website. When you embed media like an iframe element, it deletes the code. It's apparently a bug with TINYMce and grappelli, so as a workaround, I insert non-media content into the HTML editor: <div id=”youtube1”><p>width="854" height="480" src="https://www.youtube.com/emb...
I'm really just looking for some advice on my current code and with moving forward. As you can see, I have a pointer to my student list and data (which just haven't been made yet). #include<iostream> #include<cstdio> #include<cstdlib> using namespace std; class List{ //Building the base of the program, being the node...
I needed to address an issue that I met with quite a bit, which has sort of a bag of data that I can easily add items and remove them, and iterate over them at any point without an issue. First thing that came to mind was to use a linked list: easy to add, easy to remove, without having blank spaces in between, but the...
I made a program that prints out a diamond with n lines. n is equal to whatever the user inputted. I know I overuse the ternary or conditional operator, but in my opinion, it makes the code more compact, and since I am the only one reading my code, readability doesn't matter to me. My friend challenged me to write one ...
Leon asked a question which got closed both here and at Stack Overflow, but I kind of liked the idea, so I implemented a working version of his code, which I now want reviewed. With regards to Leon's original code I've done the following improvement (in case he reads this new post): Renamed variables so that they have...
Without any specific implementation details, how would you create a bitmask type that wraps binary arithmetic into something easy to read? Ideally, this would be used with an enum, which is why there are some generic methods. Some Questions Is the type a struct or class? Is the type generic or are certain methods gene...
I have a photo list page where each photo has multiple tags (as spaced words). I'm trying to display most of the tags on the page after: Removing duplicate tags Sorting tags by having most occurring tags first The code looks like this: $tags1 = "red blue green yellow colors"; $tags2 = "blue green grass tree garden";...
This class allows me to quote strings being sent to an output stream: class Quote{ public: friend std::ostream& operator<<(std::ostream& os, const Quote& obj){ obj.write(os); return os; } Quote() = delete; Quote(const string & text): text(text){} void write(ostream & os) const{ ...
I need to develop a dictionary program so I used a trie data structure to implement it. I have created a array of object with size of 26 - so each object of class Dict will have 26 sub objects like a child. This program takes no input from user for now. I gave my input in main function. but it will print all the words ...
I am using the following query to obtain a employee with his information, and get all his related roles. The query underneath works fine when we check only 1 location taking only about 0.002 seconds to process, but once we go over ~800 locations it sometimes takes up to 8 full seconds to process the request. In the act...
I have worked on the Ford-Fulkerson algorithm and have following code. The code works fine, but I fill I could do more code optimization, I have worked on it for few days. Question: Is there any remarks or comments for code improvement? /** * src = source * dst = destination */ public class MaxFlowAlgo { priv...
I have many repositories stored in a map. User chooses some of them and then a downloading begins. Repository may be one of 4 types (see code below). /** * Data class that stores settings of a connection to repository. * Lombok's annotations are used to generate some methods. */ @Getter @EqualsAndHashCode public cl...
I'm trying to do some util class to operate on enums - convert Enums to its special strings representation via interface method. String stored in enum constructors. public enum StatusEnum implements HumanReadableEnum { NOT_VERIFIED("Not verified message"), INVALID("Invalid message"), APPROVED("Approved mess...
I'm very new to python and only vaguely remember OOP from doing some Java a few years ago so I don't know what the best way to do this is. I've build a bunch of classes that represent a crawler that scrapes images from a specific website. e.g: for the website stocksnap I have a class StocksnapCrawler I have 9 of these ...
I translated the Wikipedia pseudo-code into Python code (little changes only were required), but I do not like the end result, as it looks like C with all those while loops and counters. The fact is that I cannot use a for loop as i is needed to preserve state between loops. I also added an inspect method to actually s...
I'm pretty new to Ruby, and working in the IT security field, I thought to make something useful to my work while I learn the language (even though I'm reinventing the wheel). The script is working fine and doing what I wanted it to, first checking connectivity thanks to ICMP and then bruteforcing through a wordlist to...
This is a follow up question for this question: Implementation of a dynamic list-like array This is an implementation of an array that behaves like a list, granting me an easy and quick way to: quickly add items iterate over them without caring for empty spots in the array quickly remove iterated items After follo...
I'm nearing the end of my first MVC project which uses VB.Net and MVC5. I've started writing all my view models in a very similar fashion. This has been working well for me, but being the first person on my team to use MVC, and fairly new to being a professional developer I'm curious if this is an acceptable way to w...
I have a GUI file which is currently being ran by VBS, but I have a few issues: PowerShell v2 is what is being run on every machine and I cant change that, runs very slow on first time launch. it takes about 10secs then my .ps1 will run, which can take another 10secs depending on the speed, but on second run it loads p...
Please can someone advise me, how I could use a loop for this code, in the interests of code reuse. My code is as follows public class Clubs{ public void printGreeting(int choice, String clubName[]) { System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); if (choice==1){ System.out.prin...
I have a small node.js app (MY FIRST) I have models using mongoose, controllers for each and a seperate route, I feel like this is pretty good seperation but something about the number of route files i would have to create seems not route, basically every section of the restful api would have a route, model and control...
My project uses a Promise polyfill and the fetch polyfill, that I am only including if the browser does not yet support it // Browser doesn't have Promise if (!window.Promise) { require(['es6-promise'], function(promise) { promise.polyfill(); // Browser doesn't have Promise or fetch if (!window.fetch) { ...
I was going through this code for implementing Warshall's algorithm. I think the time complexity for this simple problem is huge because there are too many loops running here. The time complexity for this code should be \$O(n^3)\$. Is there a way to optimize this code so that the time complexity can be reduced a bit?...
In a previous post I asked for a review on some code I wrote for an open-source project of mine. After the review I made some changes and I wanted to ask you for another round. This time I'm not putting all the comments in the code because I'm still working on them. Other than that, I'd ask you guys to check and indic...
I am writing a CAN bus logger application and need to format messages as quick as possible in order to prevent buffer overflows on our device. In some cases I am quick enough, but under heavy loads it is still pretty slow. I believe the bulk of the problem happens in my formatting block (I am using TPL to separate the ...
I'm back with improved version of previous Deca dimensional array sort function. This one is not just 10 dimension limited. It could be extended to unlimited number of dimensions by simply adding rows using same logic under each Select case iteration. A limit still exists, which is it's the memory limit. Compared with ...
It is currently unfinished; only case 1 of the switch(hunt) is available for choosing. Please give detailed feedback and/or quality explanations on improvements or fixes; I'm brand new to C++ and don't know a lot. #include <iostream> #include <string> #include <time.h> #include <stdio.h> #include <stdlib.h> int main(...
Following this post and the one before that, here I am asking for a review on another piece of code: the connection among two pins. As usual, be merciless in your review. Here it goes: public class PinConnection : IObserver<Pin> { #region variables private Pin _from; private Pin _to; private IDisposable...
I have been learning C++ programming. What you see here is all that I know how to do at this point. I look forward to learning more and I know there are better ways to accomplish a task such as calculating, or a less verbose method for displaying information. I want to hear from more experienced developers and engineer...
Problem 22, here, asks the following: Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list ...
From time to time I translate some Android apps: the developer sends me an XML file, e.g. <string name="foo">Foo</string> <string name="baz">Baz</string> and I send him back an XML file where the content of each element has been translated, e.g. <string name="foo">Translated foo</string> <string name="baz">Translated ...
Sometimes I need to write a simple Java console applications and menu look: do { System.out.println("please select menu item"); System.out.println("1-create, 2-remove, 3 - rename"); int select; Scanner scanner = new Scanner(System.in); select = scanner.nextInt(); switch (select) { case ...
Please review and tell me what improvements can be made: package trees; import java.util.LinkedList; import java.util.Queue; public class PrintBSTLevelByLevel { public static class Node { int data; Node left; Node right; Node(int val){ this.data = val; ...
I need to rename a large list of csv files that are generated from 3 different servers. The files are produced with a date stamp as the extension, which I need to move in each file name to retain the date stamp. The file name format before editing is as: billing.pps-svr01.csv.2015-09-01 billing.pps-svr02.csv.2015-09-0...
I have written a change calculator using Ada. when the user inputs an amount of money it returns a list of the coins and bills needed to create that total. It starts off by trying to use the largest money types then tries smaller ones. I am still learning how to use Ada and would like to know how i can make better use ...
I've wanted to make a calculator for a long time now, so I wrote one of my first parsers, where the input is in reverse polish notation, \$1 \ 1 +\$ becomes \$2\$. It supports to following operators; +, -, *, /, // floor division, ^ or ** exponent, and % or mod modulo. While it's the best calculator I've written, the t...
This is a simple program to convert miles, yards, feet, and inches appropriately. Everything intended for works but I feel my program is very redundant. How can I make it more efficient and less lines of code? I tried % but failed to find way to increment next values. #include <iostream> using namespace std; //NO GLOB...
Seeing as it's October, I thought I'd do the community challenge. Due to my inexperience coding in Groovy, I decided to give Groovy a go. I'm not sure how well I followed Groovy conventions, and the rendering is quite slow. It seem that the slow rendering might have to do with locking when writing to the BufferredImage...
I have written a network chat program as my first major project in Perl. It makes simple use of REGEXP's, modules, sockets, command-line option parsing, and forking and uses these features to produce a fairly simple client-server chat program with a basic nickname system that is capable of handling as many clients at o...
Inspired by the recent Stack Overflow question “Safely release a resource on a different thread”, I wrote the following destruction_service<T>. Please refer to the class template's DocString for more information (and let me know in your review if it is insufficient). destruction_service.hxx /** * @file destruction_se...
This is a sort-of-useless "utility" I wrote to learn my way around shell programming better. My concerns are: Is the code readable? Could it be more efficient, or just simpler? The logic ends up being a little complicated and I have a lot of nested if statements. Should I use 4 tabs instead of 2? Is the interface itse...
I currently have a design that is used to store user/selected options in a database, but I am not sure what I am doing is good or not. I need some opinion, suggestion and criticise on the design. Pre-Condition: The option is not always going to change A lot of options is going to be used Database Design: Let's say I ...
I am new to C and I am trying to implement a mutex. The idea of the program is: main() will create three threads. Each thread will read one character each from individual files in serial, i.e. thread 1 will read one character store in global and then wait for thread 2 & 3 to complete the same tasks, until the end of t...
I'm new to programming and I'm trying to teach myself Python through some online books. One of the exercises has me making a Rock Paper Scissors game. The one I have written works well enough I think, but I was wondering if there were more efficient ways of writing the code, perhaps something shorter. I'm using Python ...
Using my previous function as a base I've come up the following: create function dbo.Pbkdf2 ( @password varbinary(8000) , @salt varbinary(7996) , @iterations int = 1000 , @derivedKeyLength int = 32 ) returns varbinary(max) as begin; declare @hmacLength int = 32; declare @i int = 1; declare...
I'm trying to pick up some Haskell skills so thought I'd write a random password generator to get to grips with using IO. It was far trickier than I expected and I employed rather more trial and error than I'd have liked. What I've ended up with works, and while I'm happy with it generally I'd like to know if this is r...
I have programmed this alarm application in Java using JavaFX for the GUI. I'd like these questions covered in the review: Is my code efficient? Can it be shortened? Are there any flaws in my code? Do I violate any OOP principles? If so, how, where and how do I rectify them? App UI: Alarm.java: /* * Program develop...
Is there anything I could do to improve the following .htaccess code? Options +FollowSymLinks RewriteEngine On # Redirect non-www to www. # http://{domain}/ # http://www.{domain}/ RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteCond %{HTTP_HOST} !=localhost [NC] RewriteCond %{HTTP_HOST} !=127.0.0.1 RewriteCond %{REMOTE_...
In this topic here I have aksed for help to sort out an error while creating a generic class whose method can return a different collection given a type. I received the answer and working solution but I have a feeling the problem is not sorted in proper way. That is why I came here for a review. The reason for having a...
I created a web crawler that uses beautiful soup to crawl images from a website and scrape them to a database. in order to use it you have to create a class that inherits from Crawler and implements 4 simple methods. get_image_page_links() returns a list of the a tags that link to each images individual page. get_image...
Given a JavaScript map object of dependencies and their dependencies, determine order to install them: Example: Input: { p1: [p2, p3], p2: [p3], p3: [] } Output: [p3, p2, p1] I really feel like there's a dynamic or recursive solution to this that I can't figure out. Is this true? Can it be done better than ...
I have created a quiz in Python that will generate a series of 10 questions to test the basic arithmetic skills of primary school children. To do this, I have used a while loop and random functions to generate random numbers and operations. name = input("What is your name? ") print("Hello, "+name+". You will be complet...
I've solved Project Euler #3, but solving the same in Hacker Rank which has time constraint of < 4 seconds doesn't work. I've tried using the square root solution for speeding up but it fails. Example: The prime factors of 10000001 are 11 and 909091, we have sqrt(10000001) = 3162, if we check all primes from 2 to 3162...
I'm trying to understand and learn about the SOLID principle and especially Dependency Injection (DI) and Factory pattern. Some background: I have a production application that uses some "helpers" classes but those are all-in-one classes that I just copy into each new project. One of the (most used) functions is serial...
I would like a review of: Correctness, especially around edge/corner cases Efficiency Readability and/or style Appropriate use of Java idioms and data structures In particular: Have I missed typical idioms/patterns useful to solving the problem? Could I have reused existing/popular framework/library code? Less inte...
I'm still pretty new to JavaScript. I'm making a game to get a better understanding. Although it's working exactly how I want it to right now, the code could definitely be less repetitive and more organized. I'm just not sure how to go about that. I'm hoping someone can take a look and simply give me some pointers abou...
I have a need to extract a part of XML tree (everything under root) and convert it to a string. (The result string will be later pasted inside XSL-FO XSLT file.) The above functionality is a part of Java 6 application. I use org.w3c.dom and javax.xml.transform. Still in the debugging process. // ... // Extract all c...
I created a HangPerson game in Haskell and I must admit it feels very imperative. How can I make it more "functional?" Are there more elegant ways of breaking up the task? The getUserLines function seems to be doing a lot of work. Any additional feedback on efficiency or anything of the sort is also appreciated. import...
I'm currently on Ch 4 Lab 4 in Programming Arcade Games with Python and Pygame. Any feedback on how I could improve the code would be awesome. I'm using Python IDLE 3.4.3. import random print("Welcome to Camel!") print("""You have stolen a camel to make your way across the great Mobi desert. The natives want their cam...
I'm trying to teach myself C. I've managed to make this program I call HappyToYou.c (inspired by this video): #include <stdio.h> //#include <stdlib.h> //malloc would need this. #include <string.h> #include <err.h> void sing(char *start, char *end){ printf("%s%s.\n", start, end); } int main(int argc, char *argv[])...
I'm writing some code to administer and grade multiple choice exams. I'd like this to be easily reusable, and I don't really want to have to do things like lay out quizzes and score them with a bunch of list and dict indexing for things like answers, prompts, etc. I've tried to implement some classes to provide a consi...
I made an Agario single player version (soon to become a multi player one using socket). What can be some improvements? Controller: package agario; import java.awt.Color; import java.awt.Frame; import java.awt.Graphics; import java.awt.Rectangle; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionAdapt...
I have a very simple Node application that routes requests to /users to the following file: users.js var express = require('express'); var router = express.Router(); var User = require('models/user'); var sequelizeSuccessHandler = require('lib/sequelizeSuccessHandler'); var sequelizeErrorHandler = require('lib/sequeliz...
I'm looking for a better way to manage employee photos for employee records in our database, and a way to query for the employee photos while having them on disk I have used a FileTable to store all the EmployeePhotos. Then in my Employee View I created a join using substring, which I am concerned about. I am wondering...
I'm starting to learn about data structures and coding in C. The stack is the simplest of all data structures so I'm trying to implement an ADT stack with dynamically allocated array in C. This implementation does have one obvious problem i.e. it hoards memory even after popping the data. How do I solve this problem? s...
Could you help me further improve this code, which includes some feedback from this site already (Find common "characters" in 2 given strings (rev1))? I have rewritten the code below, including feedback, as Rev3 @ Find common “characters” in 2 given strings (rev3). import java.util.ArrayList; import java.util.Arrays; i...
Could you help me further improve this code, which includes some feedback from this site already (Find common "characters" in 2 given strings (rev2))? I have rewritten the code below, including feedback, as Rev4 @ Find common “characters” in 2 given strings (rev4). import java.util.ArrayList; import java.util.Arrays; i...
I am writing an encryption class using Crypto++. The idea is that the client connects using RSA (encrypt, decrypt) with username, password, 32 byte key. The server will then return using the stream cipher (simEncrypt, simDecrypt) a session ID. Then any communication between the systems uses the stream cipher. What woul...
Could you help me further improve this code, which includes some feedback from this site already Find common “characters” in 2 given strings (rev3)? What has changed since version 3: I re-implemented the short-circuiting of scanning the longest string argument via a loop, in the absence of .takeWhile in the Java versio...
I was reading an article on Wikipedia about memoization, so I wanted to try and apply it. I am fairly new to this subject, so I thought I'd start small. Does the program use memoization correctly? Is there anything that I can improve? #include <iostream> int fibonacci(int num, int* memoize); int main() { int num;...
Could someone please review my code and let me know if there is any scope for optimization for better performance. package com.gmail.practice; import java.util.Arrays; public class Stacks { private int top; int size; int[] stack; public Stacks(int arraysize) { size = arraysize; stack = new int[size]; to...
I wrote this simple class for calculating the nth prime: package generator; import java.math.BigInteger; public class SimplePrimeNumberGenerator implements PrimeNumberGenerator { private static final BigInteger MINUS_ONE = BigInteger.valueOf(-1); private static final BigInteger ZERO = BigInteger.ZERO; pr...
Please review the code: package com.gmail.practice; import java.util.Arrays; public class Queues { int head; int tail; int size; int[] queue; public Queues(int arraysize) { if(arraysize<0) { throw new IllegalArgumentException("size cannote be less than equ...
Could you help me further improve this code, which includes some feedback from this site already Find common “characters” in 2 given strings (rev4)? What has changed since version 4: I re-implemented the short-circuiting of scanning the longest string argument via limit(), as suggested by @mjolka. I think that part is ...
This my first java program. I wrote this as a Nim Game so that I could learn java while writing it. I would love to see how could this be made better. Sample Game: Code: import java.util.Scanner; public class Nim { public static boolean isArrayZero(int[] arr){ for(int i: arr){ if(i > 0) return fals...
Originally posted this here, and it was helpfully suggested to post in this forum. In the past couple of years I've returned part time to programming after a 15 year gap. I was C/UNIX. So, I've picked up PHP, Java and C++ ok, but have struggled with JavaScript. Finally I think I've found a way to 'create' classes that ...
From "The C Programming Language" (K&R): Exercise 1-13. Write a program to print a histogram of the lengths of words in its input. It is easy to draw the histogram with the bars horizontal; a vertical orientation is more challenging. I wrote a program to generate a vertically-oriented histogram. It doesn't accurately...
The program allows user to enter values for 3 of the following initial velocity final velocity acceleration displacement time and to specify an unknown (one of the previously mentioned variables). The program uses the Kinematic Equations to calculate the unknown. I would like a review of the entire program. I hav...
I admit I'm sort of stuck on this. I couldn't think of a better way of representing the card value that will be used in a playing card game. How well thought out is the casting an enum value to an int? I might be wrong but it does not seem very OOP. Is there a different way I should be doing it instead? void Main() { ...
I like toy AI and what can be better than starting from Tic Tac Toe. Basically, this is a command line program that asks the user to input the height of the game field, the width of the game field, the length of the winning pattern, the depth of the game search. (Some good configuration would be 5, 5, 4, 5, respectiv...