Skip to content

Commit

Permalink
dicethrower
Browse files Browse the repository at this point in the history
updates
  • Loading branch information
Alex Lovato committed Jun 25, 2014
1 parent 9cbf448 commit 2f1c7b2
Show file tree
Hide file tree
Showing 19 changed files with 213 additions and 0 deletions.
20 changes: 20 additions & 0 deletions dicethrower1000.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dicethrower1000", "dicethrower1000\dicethrower1000.csproj", "{64316285-2B2D-407E-909C-18FA2C7559CF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{64316285-2B2D-407E-909C-18FA2C7559CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64316285-2B2D-407E-909C-18FA2C7559CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64316285-2B2D-407E-909C-18FA2C7559CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{64316285-2B2D-407E-909C-18FA2C7559CF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions dicethrower1000/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
64 changes: 64 additions & 0 deletions dicethrower1000/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace dicethrower1000
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("type a format like 6d7 where 7 is the number of sides and 6 is the number of times rolled");
string input = Console.ReadLine();
Console.WriteLine("rolling: " + input);
changeInput(input);
Console.WriteLine("Results per roll");
}
static void changeInput(string dice)
{
string firstNumber = null;
string secondNumber1 = null;
string secondnumber2 = null;
var diceList = dice.ToList();
foreach (char a in diceList)
{
if (a == 'd')
{
break;
}
else {firstNumber = firstNumber + a;}
}
for (int i = diceList.Count-1; i > 0; i-- )
{
if (diceList[i] == 'd')
{
break;
}
else { secondNumber1 = secondNumber1 + diceList[i]; }
}
for (int i = secondNumber1.Length-1; i >= 0; i--)
{
secondnumber2 = secondnumber2 + secondNumber1[i];
}
Console.WriteLine("first number = " + firstNumber + "second number is = " + secondnumber2);
Console.ReadKey();
int timesRolled = int.Parse(firstNumber);
int numSides = int.Parse(secondnumber2);
for (int i = 0; i < timesRolled; i++)
{
Random randomNumberGenerator = new Random();
int randomNumber = randomNumberGenerator.Next(1, numSides);
int rollCount = i + 1;
Console.WriteLine("Results per roll");
Console.WriteLine("Roll " + rollCount + " = " + randomNumber);
Console.ReadKey();
}



}

}
}
36 changes: 36 additions & 0 deletions dicethrower1000/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("dicethrower1000")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Hewlett-Packard")]
[assembly: AssemblyProduct("dicethrower1000")]
[assembly: AssemblyCopyright("Copyright © Hewlett-Packard 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0cd61fc2-a664-47af-ab80-a6cede364479")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Binary file added dicethrower1000/bin/Debug/dicethrower1000.exe
Binary file not shown.
6 changes: 6 additions & 0 deletions dicethrower1000/bin/Debug/dicethrower1000.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
Binary file added dicethrower1000/bin/Debug/dicethrower1000.pdb
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions dicethrower1000/bin/Debug/dicethrower1000.vshost.exe.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
11 changes: 11 additions & 0 deletions dicethrower1000/bin/Debug/dicethrower1000.vshost.exe.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
58 changes: 58 additions & 0 deletions dicethrower1000/dicethrower1000.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{64316285-2B2D-407E-909C-18FA2C7559CF}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>dicethrower1000</RootNamespace>
<AssemblyName>dicethrower1000</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Binary file not shown.
Empty file.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
c:\users\technologist\documents\visual studio 2012\Projects\dicethrower1000\dicethrower1000\bin\Debug\dicethrower1000.exe.config
c:\users\technologist\documents\visual studio 2012\Projects\dicethrower1000\dicethrower1000\bin\Debug\dicethrower1000.exe
c:\users\technologist\documents\visual studio 2012\Projects\dicethrower1000\dicethrower1000\bin\Debug\dicethrower1000.pdb
c:\users\technologist\documents\visual studio 2012\Projects\dicethrower1000\dicethrower1000\obj\Debug\dicethrower1000.csprojResolveAssemblyReference.cache
c:\users\technologist\documents\visual studio 2012\Projects\dicethrower1000\dicethrower1000\obj\Debug\dicethrower1000.exe
c:\users\technologist\documents\visual studio 2012\Projects\dicethrower1000\dicethrower1000\obj\Debug\dicethrower1000.pdb
Binary file not shown.
Binary file added dicethrower1000/obj/Debug/dicethrower1000.exe
Binary file not shown.
Binary file added dicethrower1000/obj/Debug/dicethrower1000.pdb
Binary file not shown.

0 comments on commit 2f1c7b2

Please sign in to comment.